diff options
author | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-29 12:00:33 +0100 |
---|---|---|
committer | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-29 12:04:58 +0100 |
commit | 95101ac2180188af83439a7ba4c16b50816df708 (patch) | |
tree | f16fb63ca71639255531e2124a38a64ee5ede74b /service/test/support | |
parent | 728ef897afe531017d9ba507a2e4075815a0a4dc (diff) |
fix request mock for app test client
See
https://github.com/twisted/twisted/blob/160ecab6505e6634a8ea5c33fa209f90ffd5e52d/src/twisted/web/server.py#L182
Diffstat (limited to 'service/test/support')
-rw-r--r-- | service/test/support/test_helper.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service/test/support/test_helper.py b/service/test/support/test_helper.py index 3323a14e..c94d62c4 100644 --- a/service/test/support/test_helper.py +++ b/service/test/support/test_helper.py @@ -121,7 +121,7 @@ class PixRequestMock(DummyRequest): def request_mock(path='', method='GET', body='', headers={}, ajax=True, csrf='token'): - dummy = PixRequestMock(path.split('/')) + dummy = PixRequestMock(path[1:].split('/')) for name, val in headers.iteritems(): dummy.requestHeaders.setRawHeaders(name.lower(), [val]) dummy.method = method |