summaryrefslogtreecommitdiffstats
path: root/ipatests/test_ipaserver/test_rpcserver.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-06-22 10:58:43 +0000
committerJan Cholasta <jcholast@redhat.com>2015-07-01 13:05:30 +0000
commite39fe4ed31042bd28357d093fdbd93b4d6d59aaa (patch)
treec9edd3b3d710ae642d91eb8ca0c060cb5f6d0f0c /ipatests/test_ipaserver/test_rpcserver.py
parent2d1515323acb4125306817096bafab6623de0b47 (diff)
downloadfreeipa-e39fe4ed31042bd28357d093fdbd93b4d6d59aaa.tar.gz
freeipa-e39fe4ed31042bd28357d093fdbd93b4d6d59aaa.tar.xz
freeipa-e39fe4ed31042bd28357d093fdbd93b4d6d59aaa.zip
plugable: Pass API to plugins on initialization rather than using set_api
https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipatests/test_ipaserver/test_rpcserver.py')
-rw-r--r--ipatests/test_ipaserver/test_rpcserver.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/ipatests/test_ipaserver/test_rpcserver.py b/ipatests/test_ipaserver/test_rpcserver.py
index 08d773c3d..c77c2d97c 100644
--- a/ipatests/test_ipaserver/test_rpcserver.py
+++ b/ipatests/test_ipaserver/test_rpcserver.py
@@ -47,7 +47,8 @@ class StartResponse(object):
def test_not_found():
- f = rpcserver.HTTP_Status()
+ api = 'the api instance'
+ f = rpcserver.HTTP_Status(api)
t = rpcserver._not_found_template
s = StartResponse()
@@ -72,7 +73,8 @@ def test_not_found():
def test_bad_request():
- f = rpcserver.HTTP_Status()
+ api = 'the api instance'
+ f = rpcserver.HTTP_Status(api)
t = rpcserver._bad_request_template
s = StartResponse()
@@ -85,7 +87,8 @@ def test_bad_request():
def test_internal_error():
- f = rpcserver.HTTP_Status()
+ api = 'the api instance'
+ f = rpcserver.HTTP_Status(api)
t = rpcserver._internal_error_template
s = StartResponse()
@@ -98,7 +101,8 @@ def test_internal_error():
def test_unauthorized_error():
- f = rpcserver.HTTP_Status()
+ api = 'the api instance'
+ f = rpcserver.HTTP_Status(api)
t = rpcserver._unauthorized_template
s = StartResponse()
@@ -139,7 +143,8 @@ class test_session(object):
[environ[k] for k in ('SCRIPT_NAME', 'PATH_INFO')]
)
- inst = self.klass()
+ api = 'the api instance'
+ inst = self.klass(api)
inst.mount(app1, '/foo/stuff')
inst.mount(app2, '/bar')
@@ -157,7 +162,8 @@ class test_session(object):
pass
# Test that mount works:
- inst = self.klass()
+ api = 'the api instance'
+ inst = self.klass(api)
inst.mount(app1, 'foo')
assert inst['foo'] is app1
assert list(inst) == ['foo']