Merge "Reuse mocked body value between tests"
This commit is contained in:
commit
c4bfc797ff
@ -32,10 +32,9 @@ class TestAgentsClient(base.TestCase):
|
|||||||
'compute', 'regionOne')
|
'compute', 'regionOne')
|
||||||
|
|
||||||
def _test_list_agents(self, bytes_body=False):
|
def _test_list_agents(self, bytes_body=False):
|
||||||
if bytes_body:
|
|
||||||
body = bytes(b'{"agents": []}')
|
|
||||||
else:
|
|
||||||
body = '{"agents": []}'
|
body = '{"agents": []}'
|
||||||
|
if bytes_body:
|
||||||
|
body = bytes(body.encode('utf-8'))
|
||||||
expected = []
|
expected = []
|
||||||
response = (httplib2.Response({'status': 200}), body)
|
response = (httplib2.Response({'status': 200}), body)
|
||||||
self.useFixture(mockpatch.Patch(
|
self.useFixture(mockpatch.Patch(
|
||||||
|
Loading…
Reference in New Issue
Block a user