diff options
author | 2019-05-12 13:33:24 +0200 | |
---|---|---|
committer | 2019-05-23 21:01:33 +0200 | |
commit | f11bf388d5fddd6744b7c674610dfce2ff83b8e5 (patch) | |
tree | 25af340d77745c52476e47dab4991220a1c01bf2 /xtesting/tests/unit/core/test_unit.py | |
parent | 2ec3c146072aab8d815be28e204cd29c2f19cb64 (diff) |
Fix unit tests (py36)
It completes the patch "Update to Python3" [1] which was not fully
verified in Functest Gates [2].
[1] https://gerrit.opnfv.org/gerrit/#/c/67782/
[2] https://travis-ci.org/collivier/functest-xtesting/jobs/531380395
Change-Id: Icd0d743e14ca1430828907cefba10b50489020a5
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 934e90a269ea6b65e38578ac3f9a8bf7fc5212b1)
Diffstat (limited to 'xtesting/tests/unit/core/test_unit.py')
-rw-r--r-- | xtesting/tests/unit/core/test_unit.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xtesting/tests/unit/core/test_unit.py b/xtesting/tests/unit/core/test_unit.py index 0af3ddca..3be41442 100644 --- a/xtesting/tests/unit/core/test_unit.py +++ b/xtesting/tests/unit/core/test_unit.py @@ -34,7 +34,7 @@ class SuiteTesting(unittest.TestCase): @mock.patch('subprocess.Popen', return_value=mock.Mock( - communicate=mock.Mock(return_value=("foo", "bar")))) + communicate=mock.Mock(return_value=(b"foo", b"bar")))) def test_generate_stats_ok(self, *args): stream = six.StringIO() self.psrunner.generate_stats(stream) @@ -57,7 +57,7 @@ class SuiteTesting(unittest.TestCase): @mock.patch('subprocess.Popen', return_value=mock.Mock( - communicate=mock.Mock(return_value=("foo", "bar")))) + communicate=mock.Mock(return_value=(b"foo", b"bar")))) def test_generate_xunit_ok(self, *args): stream = six.BytesIO() with mock.patch('six.moves.builtins.open', |