Skip to content
Snippets Groups Projects
Unverified Commit 5b701b51 authored by Ryan Beisner's avatar Ryan Beisner
Browse files

Fix lint in unit tests re: py3-first and py2 compat

Change-Id: Iaafe2c368390706a61976d3f13fd83d515ce4b3e
parent 06ac9046
No related branches found
No related tags found
No related merge requests found
......@@ -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)'})
......
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment