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