summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2010-02-04 09:52:33 -0700
committerRob Crittenden <rcritten@redhat.com>2010-02-05 14:32:04 -0500
commitc43b69e77cf46118d40b89e6be557d19181da8f6 (patch)
tree57b0c139523284f342d2045368aa59c0551d0fe0 /tests
parentea6dfc30fa9003850c7d57f1246334381ed74b71 (diff)
downloadfreeipa-c43b69e77cf46118d40b89e6be557d19181da8f6.tar.gz
freeipa-c43b69e77cf46118d40b89e6be557d19181da8f6.tar.xz
freeipa-c43b69e77cf46118d40b89e6be557d19181da8f6.zip
Add support for the 'no_create', 'no_update', and 'no_search' Param flags
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ipalib/test_crud.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_ipalib/test_crud.py b/tests/test_ipalib/test_crud.py
index 47d51c5d..969fb4fd 100644
--- a/tests/test_ipalib/test_crud.py
+++ b/tests/test_ipalib/test_crud.py
@@ -23,6 +23,7 @@ Test the `ipalib.crud` module.
from tests.util import read_only, raises, get_api, ClassChecker
from ipalib import crud, frontend, plugable, config
+from ipalib.parameters import Str
class CrudChecker(ClassChecker):
@@ -38,9 +39,10 @@ class CrudChecker(ClassChecker):
class user(frontend.Object):
takes_params = (
'givenname',
- 'sn',
- frontend.Param('uid', primary_key=True),
+ Str('sn', flags='no_update'),
+ Str('uid', primary_key=True),
'initials',
+ Str('uidnumber', flags=['no_create', 'no_search'])
)
class user_verb(self.cls):
takes_args = args
@@ -102,7 +104,7 @@ class test_Update(CrudChecker):
"""
api = self.get_api()
assert list(api.Method.user_verb.options) == \
- ['givenname', 'sn', 'initials']
+ ['givenname', 'initials', 'uidnumber']
for param in api.Method.user_verb.options():
assert param.required is False