diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2012-06-20 16:08:33 +0300 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-06-28 16:53:33 +0200 |
commit | a6ff85f425d5c38dd89fcd8999e0d62eadb969a1 (patch) | |
tree | 04ae9b01be916209b2156e915da7ebddff065fc0 /tests/test_xmlrpc/xmlrpc_test.py | |
parent | 52f69aaa8ab4d633bbeb96799bf96e8a715d0ae0 (diff) | |
download | freeipa.git-a6ff85f425d5c38dd89fcd8999e0d62eadb969a1.tar.gz freeipa.git-a6ff85f425d5c38dd89fcd8999e0d62eadb969a1.tar.xz freeipa.git-a6ff85f425d5c38dd89fcd8999e0d62eadb969a1.zip |
Add support for external group members
When using ipaExternalGroup/ipaExternalMember attributes it is
possible to add group members which don't exist in IPA database.
This is primarily is required for AD trusts support and therefore
validation is accepting only secure identifier (SID) format.
https://fedorahosted.org/freeipa/ticket/2664
Diffstat (limited to 'tests/test_xmlrpc/xmlrpc_test.py')
-rw-r--r-- | tests/test_xmlrpc/xmlrpc_test.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/xmlrpc_test.py b/tests/test_xmlrpc/xmlrpc_test.py index c279107b..cfba35fc 100644 --- a/tests/test_xmlrpc/xmlrpc_test.py +++ b/tests/test_xmlrpc/xmlrpc_test.py @@ -260,6 +260,8 @@ class Declarative(XMLRPC_test): raise nose.SkipTest('%r not in api.Command' % cmd) if isinstance(expected, errors.PublicError): self.check_exception(nice, cmd, args, options, expected) + elif hasattr(expected, '__call__'): + self.check_callable(nice, cmd, args, options, expected) else: self.check_output(nice, cmd, args, options, expected, extra_check) @@ -285,6 +287,18 @@ class Declarative(XMLRPC_test): # For now just compare the strings assert_deepequal(expected.strerror, e.strerror) + def check_callable(self, nice, cmd, args, options, expected): + output = dict() + e = None + try: + output = api.Command[cmd](*args, **options) + except StandardError, e: + pass + if not expected(e, output): + raise AssertionError( + UNEXPECTED % (cmd, args, options, e.__class__.__name__, e) + ) + def check_output(self, nice, cmd, args, options, expected, extra_check): got = api.Command[cmd](*args, **options) assert_deepequal(expected, got, nice) |