diff --git a/unit_tests/test_ceph_broker.py b/unit_tests/test_ceph_broker.py index b720d94..bae4b3d 100644 --- a/unit_tests/test_ceph_broker.py +++ b/unit_tests/test_ceph_broker.py @@ -28,7 +28,7 @@ class CephBrokerTestCase(unittest.TestCase): def test_process_requests_invalid_api_version(self, mock_log): req = json.dumps({'api-version': 2, 'ops': []}) rc = ceph_broker.process_requests(req) - print "Return: %s" % rc + print("Return: {}".format(rc)) self.assertEqual(json.loads(rc), {'exit-code': 1, 'stderr': 'Missing or invalid api version (2)'}) diff --git a/unit_tests/test_utils.py b/unit_tests/test_utils.py index 663a048..0a77482 100644 --- a/unit_tests/test_utils.py +++ b/unit_tests/test_utils.py @@ -110,7 +110,7 @@ def patch_open(): Yields the mock for "open" and "file", respectively.''' mock_open = MagicMock(spec=open) - mock_file = MagicMock(spec=file) + mock_file = MagicMock(spec=file) # noqa - transitional py2 py3 @contextmanager def stub_open(*args, **kwargs):