diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-03-27 09:27:11 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-04-10 21:05:45 -0400 |
commit | 6d0e4e58fcc33f8c4514750eb6e5d7b5882efef8 (patch) | |
tree | d576654b11cb834c01701e855bbf324aa1ce2171 /tests/test_xmlrpc/test_delegation_plugin.py | |
parent | 689bea65757bae66b387acde3ffc7897e6b0ec3b (diff) | |
download | freeipa-6d0e4e58fcc33f8c4514750eb6e5d7b5882efef8.tar.gz freeipa-6d0e4e58fcc33f8c4514750eb6e5d7b5882efef8.tar.xz freeipa-6d0e4e58fcc33f8c4514750eb6e5d7b5882efef8.zip |
Fix expected error messages in tests
Have the test suite check error messages.
Since XMLRPC doesn't give us structured error information, just
compare the resulting text.
Fix messages that tests expect to cause.
Minor changes:
Make netgroup-mod's NotFound message consistent with other objects
and methods.
In test_automember_plugin, test with nonexistent automember rules
of both types, instead of nonexistent users.
https://fedorahosted.org/freeipa/ticket/2549
Diffstat (limited to 'tests/test_xmlrpc/test_delegation_plugin.py')
-rw-r--r-- | tests/test_xmlrpc/test_delegation_plugin.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test_xmlrpc/test_delegation_plugin.py b/tests/test_xmlrpc/test_delegation_plugin.py index c4473b9d4..95aa82877 100644 --- a/tests/test_xmlrpc/test_delegation_plugin.py +++ b/tests/test_xmlrpc/test_delegation_plugin.py @@ -39,21 +39,24 @@ class test_delegation(Declarative): dict( desc='Try to retrieve non-existent %r' % delegation1, command=('delegation_show', [delegation1], {}), - expected=errors.NotFound(reason='no such entry'), + expected=errors.NotFound( + reason=u'ACI with name "%s" not found' % delegation1), ), dict( desc='Try to update non-existent %r' % delegation1, command=('delegation_mod', [delegation1], dict(group=u'admins')), - expected=errors.NotFound(reason='no such entry'), + expected=errors.NotFound( + reason=u'ACI with name "%s" not found' % delegation1), ), dict( desc='Try to delete non-existent %r' % delegation1, command=('delegation_del', [delegation1], {}), - expected=errors.NotFound(reason='no such entry'), + expected=errors.NotFound( + reason=u'ACI with name "%s" not found' % delegation1), ), @@ -78,7 +81,7 @@ class test_delegation(Declarative): memberof=u'nonexisting', ), ), - expected=errors.NotFound(reason='group not found'), + expected=errors.NotFound(reason=u'nonexisting: group not found'), ), # Note that we add postalCode but expect postalcode. This tests |