summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2016-09-12 16:34:15 -0300
committerTulio Casagrande <tcasagra@thoughtworks.com>2016-09-12 16:34:15 -0300
commit13190c695c1b58a1f28d2c1533c36c0353b0a438 (patch)
tree992c0324f71799833fd77443d1e1e193a2552716
parent8e7b7d53a6bef24ced29549746699f26595f4c71 (diff)
[#698] Add default user to the integration test client
The functional tests depend on a pre-existing default user. As it uses the integration test client, we added this default user to the client setup.
-rw-r--r--service/test/support/integration/app_test_client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py
index 619062a8..3a3b7ddf 100644
--- a/service/test/support/integration/app_test_client.py
+++ b/service/test/support/integration/app_test_client.py
@@ -198,7 +198,9 @@ class AppTestClient(object):
else:
self.service_factory = StubServicesFactory(self.accounts, mode)
provider = mock()
- self.resource = set_up_protected_resources(RootResource(self.service_factory), provider, self.service_factory, checker=StubSRPChecker(provider))
+ srp_checker = StubSRPChecker(provider)
+ srp_checker.add_user('username', 'password')
+ self.resource = set_up_protected_resources(RootResource(self.service_factory), provider, self.service_factory, checker=srp_checker)
@defer.inlineCallbacks
def create_user(self, account_name):