summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_plugable.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-07 00:14:38 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-07 00:14:38 +0000
commit7335af8a9eb4b5ab6a0884f686a51a050464320b (patch)
treebabc5a385d0a74b0e8d4ffc88026c22e968810bb /ipalib/tests/test_plugable.py
parent03bad04e7bdf6bf02eca13e0b3af3beb587fdc3d (diff)
downloadfreeipa.git-7335af8a9eb4b5ab6a0884f686a51a050464320b.tar.gz
freeipa.git-7335af8a9eb4b5ab6a0884f686a51a050464320b.tar.xz
freeipa.git-7335af8a9eb4b5ab6a0884f686a51a050464320b.zip
68: Ported to changes in NameSpace, Proxy; updated unit tests
Diffstat (limited to 'ipalib/tests/test_plugable.py')
-rw-r--r--ipalib/tests/test_plugable.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/ipalib/tests/test_plugable.py b/ipalib/tests/test_plugable.py
index 0e170564..ebc3a78f 100644
--- a/ipalib/tests/test_plugable.py
+++ b/ipalib/tests/test_plugable.py
@@ -352,18 +352,19 @@ def test_Registrar():
def test_API():
assert issubclass(plugable.API, plugable.ReadOnly)
- # Setup the test plugins, create the Registrar:
- class ExampleProxy(plugable.Proxy):
- __slots__ = ['method']
-
+ # Setup the test bases, create the API:
class base0(plugable.Plugin):
- proxy = ExampleProxy
+ public = frozenset((
+ 'method',
+ ))
def method(self, n):
return n
class base1(plugable.Plugin):
- proxy = ExampleProxy
+ public = frozenset((
+ 'method',
+ ))
def method(self, n):
return n + 1
@@ -415,7 +416,7 @@ def test_API():
for p in xrange(3):
plugin_name = get_plugin(b, p)
proxy = ns[plugin_name]
- assert isinstance(proxy, ExampleProxy)
+ assert isinstance(proxy, plugable.Proxy)
assert proxy.name == plugin_name
assert read_only(ns, plugin_name) is proxy
assert read_only(proxy, 'method')(7) == 7 + b