diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-30 01:11:33 -0600 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-30 01:11:33 -0600 |
commit | ddb5449c7faabbd4c1b71adfe84c386b943a163f (patch) | |
tree | 07a38af3cfbdd29d6df6adfae4169d9130c1086d /tests/test_ipalib | |
parent | e37760a27358021962a6e6a8a7fbdc5195ce5bbe (diff) | |
download | freeipa-ddb5449c7faabbd4c1b71adfe84c386b943a163f.tar.gz freeipa-ddb5449c7faabbd4c1b71adfe84c386b943a163f.tar.xz freeipa-ddb5449c7faabbd4c1b71adfe84c386b943a163f.zip |
Did some initial work for Context plugins
Diffstat (limited to 'tests/test_ipalib')
-rw-r--r-- | tests/test_ipalib/test_backend.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/test_ipalib/test_backend.py b/tests/test_ipalib/test_backend.py index cd490fe04..88bd2da47 100644 --- a/tests/test_ipalib/test_backend.py +++ b/tests/test_ipalib/test_backend.py @@ -22,12 +22,12 @@ Test the `ipalib.backend` module. """ from ipalib import backend, plugable, errors -from tests.util import ClassChecker +from tests.util import ClassChecker, raises class test_Backend(ClassChecker): """ - Test the `backend.Backend` class. + Test the `ipalib.backend.Backend` class. """ _cls = backend.Backend @@ -35,3 +35,21 @@ class test_Backend(ClassChecker): def test_class(self): assert self.cls.__bases__ == (plugable.Plugin,) assert self.cls.__proxy__ is False + + +class test_Context(ClassChecker): + """ + Test the `ipalib.backend.Context` class. + """ + + _cls = backend.Context + + def test_get_value(self): + """ + Test the `ipalib.backend.Context.get_value` method. + """ + class Subclass(self.cls): + pass + o = Subclass() + e = raises(NotImplementedError, o.get_value) + assert str(e) == 'Subclass.get_value()' |