Merge "Reuse mocked body value between tests"

This commit is contained in:
Jenkins 2015-07-20 16:53:14 +00:00 committed by Gerrit Code Review
commit c4bfc797ff

View File

@ -32,10 +32,9 @@ class TestAgentsClient(base.TestCase):
'compute', 'regionOne')
def _test_list_agents(self, bytes_body=False):
if bytes_body:
body = bytes(b'{"agents": []}')
else:
body = '{"agents": []}'
if bytes_body:
body = bytes(body.encode('utf-8'))
expected = []
response = (httplib2.Response({'status': 200}), body)
self.useFixture(mockpatch.Patch(