tests: fix "clients/tests/test-client.py" concatenating binary for Python 3

Python 3 doesn't like this:

    ======================================================================
    ERROR: test_001 (__main__.TestNmcli)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "./clients/tests/test-client.py", line 785, in f
        self._nm_test_post()
      File "./clients/tests/test-client.py", line 767, in _nm_test_post
        content_new = ''.join([r['content'] for r in results])
    TypeError: sequence item 0: expected str instance, bytes found

(cherry picked from commit 97646d81ce)
(cherry picked from commit ae2d6c0bc9)
This commit is contained in:
Thomas Haller 2019-09-24 20:03:47 +02:00
parent 4023968251
commit 298e57e446

View file

@ -764,7 +764,7 @@ class TestNmcli(NmTestBase):
self.fail("Unexpected output of command, expected %s. Rerun test with NM_TEST_REGENERATE=1 to regenerate files" % (filename))
if regenerate:
content_new = ''.join([r['content'] for r in results])
content_new = b''.join([r['content'] for r in results])
if content_new != content_expect:
try:
with open(filename, 'wb') as content_file: