Shorten MockServerConnection.post()
This commit is contained in:
parent
c9c02d3253
commit
af8548182b
@ -18,15 +18,8 @@ class MockServerConnection:
|
||||
|
||||
def post(self, url, data, headers):
|
||||
logging.debug("Posting to URI '{}'.".format(url))
|
||||
test_response = self.test_app.post(url,
|
||||
params=data.read(),
|
||||
headers=headers,
|
||||
status="*")
|
||||
|
||||
r = types.SimpleNamespace()
|
||||
r.status_code = test_response.status_int
|
||||
r.body = test_response.body
|
||||
return r
|
||||
r = self.test_app.post(url, params=data.read(), headers=headers, status="*")
|
||||
return types.SimpleNamespace(status_code=r.status_int, body=r.body)
|
||||
|
||||
|
||||
def streamContent(self, r):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user