summaryrefslogtreecommitdiff
path: root/tests/unit/core/test_web_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/core/test_web_api.py')
-rw-r--r--tests/unit/core/test_web_api.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/core/test_web_api.py b/tests/unit/core/test_web_api.py
index 5b51869f..10356f02 100644
--- a/tests/unit/core/test_web_api.py
+++ b/tests/unit/core/test_web_api.py
@@ -131,7 +131,7 @@ class RESTApiTests(unittest.TestCase):
def setUp(self):
dispatcher = dummyDispatcherFactory()
- api = web.api.Api(dispatcher)
+ api = web.api.Api(dispatcher, ['aaa'])
root = resource.Resource()
root.putChild(b"API", api)
plainSite = Site(root)
@@ -205,7 +205,8 @@ class RESTApiTests(unittest.TestCase):
uri = networkString("http://127.0.0.1:%d/API/%s" % (
self.plainPortno, path))
return client.getPage(
- uri, method=method, timeout=1, postdata=postdata)
+ uri, method=method, timeout=1, postdata=postdata,
+ headers={'X-Bitmask-Auth': 'aaa'})
def assertCall(self, returned, expected):
data = json.loads(returned)