diff options
author | Pavel Zuna <pzuna@redhat.com> | 2009-08-27 15:55:19 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-10-05 15:59:09 -0400 |
commit | e01b1b8f99e67b08d1827b13f411f6d3cccfcf41 (patch) | |
tree | 674f392b669e5d5e46bc30dde550926494cfce4b /tests/test_ipalib/test_crud.py | |
parent | 1e48662b9ba623ebd8ad62035c9c84dc4f1fed70 (diff) | |
download | freeipa-e01b1b8f99e67b08d1827b13f411f6d3cccfcf41.tar.gz freeipa-e01b1b8f99e67b08d1827b13f411f6d3cccfcf41.tar.xz freeipa-e01b1b8f99e67b08d1827b13f411f6d3cccfcf41.zip |
Fix unit tests for plugins using baseldap classes.
Diffstat (limited to 'tests/test_ipalib/test_crud.py')
-rw-r--r-- | tests/test_ipalib/test_crud.py | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/tests/test_ipalib/test_crud.py b/tests/test_ipalib/test_crud.py index ecbf0efd5..a7f49f878 100644 --- a/tests/test_ipalib/test_crud.py +++ b/tests/test_ipalib/test_crud.py @@ -52,140 +52,6 @@ class CrudChecker(ClassChecker): return api -class test_Add(CrudChecker): - """ - Test the `ipalib.crud.Add` class. - """ - - _cls = crud.Add - - def test_get_args(self): - """ - Test the `ipalib.crud.Add.get_args` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.args) == ['uid'] - assert api.Method.user_verb.args.uid.required is True - api = self.get_api(args=('extra?',)) - assert list(api.Method.user_verb.args) == ['uid', 'extra'] - assert api.Method.user_verb.args.uid.required is True - assert api.Method.user_verb.args.extra.required is False - - def test_get_options(self): - """ - Test the `ipalib.crud.Add.get_options` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.options) == \ - ['givenname', 'sn', 'initials'] - for param in api.Method.user_verb.options(): - assert param.required is True - api = self.get_api(options=('extra?',)) - assert list(api.Method.user_verb.options) == \ - ['givenname', 'sn', 'initials', 'extra'] - assert api.Method.user_verb.options.extra.required is False - - -class test_Get(CrudChecker): - """ - Test the `ipalib.crud.Get` class. - """ - - _cls = crud.Get - - def test_get_args(self): - """ - Test the `ipalib.crud.Get.get_args` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.args) == ['uid'] - assert api.Method.user_verb.args.uid.required is True - - def test_get_options(self): - """ - Test the `ipalib.crud.Get.get_options` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.options) == [] - assert len(api.Method.user_verb.options) == 0 - - -class test_Del(CrudChecker): - """ - Test the `ipalib.crud.Del` class. - """ - - _cls = crud.Del - - def test_get_args(self): - """ - Test the `ipalib.crud.Del.get_args` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.args) == ['uid'] - assert api.Method.user_verb.args.uid.required is True - - def test_get_options(self): - """ - Test the `ipalib.crud.Del.get_options` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.options) == [] - assert len(api.Method.user_verb.options) == 0 - - -class test_Mod(CrudChecker): - """ - Test the `ipalib.crud.Mod` class. - """ - - _cls = crud.Mod - - def test_get_args(self): - """ - Test the `ipalib.crud.Mod.get_args` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.args) == ['uid'] - assert api.Method.user_verb.args.uid.required is True - - def test_get_options(self): - """ - Test the `ipalib.crud.Mod.get_options` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.options) == \ - ['givenname', 'sn', 'initials'] - for param in api.Method.user_verb.options(): - assert param.required is False - - -class test_Find(CrudChecker): - """ - Test the `ipalib.crud.Find` class. - """ - - _cls = crud.Find - - def test_get_args(self): - """ - Test the `ipalib.crud.Find.get_args` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.args) == ['uid'] - assert api.Method.user_verb.args.uid.required is True - - def test_get_options(self): - """ - Test the `ipalib.crud.Find.get_options` method. - """ - api = self.get_api() - assert list(api.Method.user_verb.options) == \ - ['givenname', 'sn', 'initials'] - for param in api.Method.user_verb.options(): - assert param.required is False - - class test_CrudBackend(ClassChecker): """ Test the `ipalib.crud.CrudBackend` class. |