mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 11:20:12 +01:00
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:
parent
4023968251
commit
298e57e446
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue