Commit 97646d81 authored by Thomas Haller's avatar Thomas Haller

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
parent 989b26a8
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment