summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-09-30 20:27:52 -0600
committerJason Gerard DeRose <jderose@redhat.com>2008-09-30 20:27:52 -0600
commit7ee0ccd90d99609f8e85bf0e197ca5a747231fb8 (patch)
tree8dc16d336a7bcfa92bf8251e0f3bf94181cf5719
parent77e6c99f9d8e34e85add7671d89bf7698a4fe5c2 (diff)
downloadfreeipa-7ee0ccd90d99609f8e85bf0e197ca5a747231fb8.tar.gz
freeipa-7ee0ccd90d99609f8e85bf0e197ca5a747231fb8.tar.xz
freeipa-7ee0ccd90d99609f8e85bf0e197ca5a747231fb8.zip
Fixed unit tests; changed example.py so it doesn't import servercore
-rw-r--r--ipalib/crud.py2
-rw-r--r--ipalib/plugins/example.py2
-rw-r--r--ipalib/tests/test_crud.py4
3 files changed, 3 insertions, 5 deletions
diff --git a/ipalib/crud.py b/ipalib/crud.py
index 813e0c814..9f9d727fd 100644
--- a/ipalib/crud.py
+++ b/ipalib/crud.py
@@ -30,7 +30,7 @@ class Add(frontend.Method):
def get_options(self):
for param in self.obj.params_minus_pk():
- yield param.__clone__(required=False)
+ yield param
class Get(frontend.Method):
diff --git a/ipalib/plugins/example.py b/ipalib/plugins/example.py
index 6113c1174..e4d7dc101 100644
--- a/ipalib/plugins/example.py
+++ b/ipalib/plugins/example.py
@@ -25,8 +25,6 @@ from ipalib import frontend
from ipalib import crud
from ipalib.frontend import Param
from ipalib import api
-from ipa_server import servercore
-import ldap
class user(frontend.Object):
'User object'
diff --git a/ipalib/tests/test_crud.py b/ipalib/tests/test_crud.py
index e95fe5092..df85253b8 100644
--- a/ipalib/tests/test_crud.py
+++ b/ipalib/tests/test_crud.py
@@ -61,9 +61,9 @@ class test_Add(ClassChecker):
pass
api.register(user_add)
api.finalize()
- assert list(api.Method.user_add.args) == []
+ assert list(api.Method.user_add.args) == ['uid']
assert list(api.Method.user_add.options) == \
- ['givenname', 'sn', 'uid', 'initials']
+ ['givenname', 'sn', 'initials']
for param in api.Method.user_add.options():
assert param.required is True