summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_public.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/tests/test_public.py')
-rw-r--r--ipalib/tests/test_public.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py
index 56da573a..be1b9158 100644
--- a/ipalib/tests/test_public.py
+++ b/ipalib/tests/test_public.py
@@ -291,6 +291,18 @@ class test_Option2(ClassChecker):
assert o.get_default() == (default,)
assert o.get_default(first='John', last='Doe') == ('Hello, John Doe!',)
+ def test_get_default(self):
+ """
+ Tests the `public.Option2.get_values` method.
+ """
+ name = 'status'
+ doc = 'Account status'
+ values = (u'Active', u'Inactive')
+ o = self.cls(name, doc, ipa_types.Unicode())
+ assert o.get_values() == tuple()
+ o = self.cls(name, doc, ipa_types.Enum(*values))
+ assert o.get_values() == values
+
class test_Option(ClassChecker):
"""