summaryrefslogtreecommitdiff
path: root/service/test/support
diff options
context:
space:
mode:
authorNavaL <mnandri@thoughtworks.com>2016-02-25 09:16:28 +0100
committerNavaL <mnandri@thoughtworks.com>2016-02-25 09:43:02 +0100
commit1e1668f98afd04e2da7c779a825e6d28e777fec7 (patch)
tree3083f6e70f1e3ae004326ff2ece87a768794c40a /service/test/support
parent9573bdca55ddc5488066d3af525e41ed1d872ea6 (diff)
changed logout to post
Issue #612
Diffstat (limited to 'service/test/support')
-rw-r--r--service/test/support/integration/multi_user_client.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/service/test/support/integration/multi_user_client.py b/service/test/support/integration/multi_user_client.py
index fa65fb06..5f24456b 100644
--- a/service/test/support/integration/multi_user_client.py
+++ b/service/test/support/integration/multi_user_client.py
@@ -82,3 +82,12 @@ class MultiUserClient(AppTestClient):
session = from_request.getSession()
request.session = session
return self._render(request, as_json)
+
+ def post(self, path, body='', headers=None, ajax=True, csrf='token', as_json=True, from_request=None):
+ headers = headers or {'Content-Type': 'application/json'}
+ request = request_mock(path=path, method="POST", body=body, headers=headers, ajax=ajax, csrf=csrf)
+
+ if from_request:
+ session = from_request.getSession()
+ request.session = session
+ return self._render(request, as_json)