summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_crud.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/tests/test_crud.py')
-rw-r--r--ipalib/tests/test_crud.py29
1 files changed, 26 insertions, 3 deletions
diff --git a/ipalib/tests/test_crud.py b/ipalib/tests/test_crud.py
index 41eb8834..2cbf4b16 100644
--- a/ipalib/tests/test_crud.py
+++ b/ipalib/tests/test_crud.py
@@ -51,9 +51,9 @@ class test_Add(ClassChecker):
def test_class(self):
assert self.cls.__bases__ == (frontend.Method,)
- def test_get_options(self):
+ def test_options_args(self):
"""
- Test the `crud.Add.get_options` method.
+ Test `crud.Add.get_args` and `crud.Add.get_options` methods.
"""
api = get_api()
class user_add(self.cls):
@@ -65,7 +65,6 @@ class test_Add(ClassChecker):
['givenname', 'sn', 'uid', 'initials']
-
class test_Get(ClassChecker):
"""
Test the `crud.Get` class.
@@ -76,6 +75,18 @@ class test_Get(ClassChecker):
def test_class(self):
assert self.cls.__bases__ == (frontend.Method,)
+ def test_options_args(self):
+ """
+ Test `crud.Get.get_args` and `crud.Get.get_options` methods.
+ """
+ api = get_api()
+ class user_get(self.cls):
+ pass
+ api.register(user_get)
+ api.finalize()
+ assert list(api.Method.user_get.args) == ['uid']
+ assert list(api.Method.user_get.options) == []
+
class test_Del(ClassChecker):
"""
@@ -87,6 +98,18 @@ class test_Del(ClassChecker):
def test_class(self):
assert self.cls.__bases__ == (frontend.Method,)
+ def test_options_args(self):
+ """
+ Test `crud.Del.get_args` and `crud.Del.get_options` methods.
+ """
+ api = get_api()
+ class user_del(self.cls):
+ pass
+ api.register(user_del)
+ api.finalize()
+ assert list(api.Method.user_del.args) == ['uid']
+ assert list(api.Method.user_del.options) == []
+
class test_Mod(ClassChecker):
"""