From 6d0e4e58fcc33f8c4514750eb6e5d7b5882efef8 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 27 Mar 2012 09:27:11 -0400 Subject: 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 --- tests/test_xmlrpc/xmlrpc_test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/test_xmlrpc/xmlrpc_test.py') diff --git a/tests/test_xmlrpc/xmlrpc_test.py b/tests/test_xmlrpc/xmlrpc_test.py index 28f5fac7..c279107b 100644 --- a/tests/test_xmlrpc/xmlrpc_test.py +++ b/tests/test_xmlrpc/xmlrpc_test.py @@ -282,10 +282,8 @@ class Declarative(XMLRPC_test): # information through the exception, so we can't test the kw on the # client side. However, if we switch to using JSON-RPC for the default # transport, the exception is a free-form data structure (dict). -# if e.kw != expected.kw: -# raise AssertionError( -# KWARGS % (cmd, name, args, options, expected.kw, e.kw) -# ) + # For now just compare the strings + assert_deepequal(expected.strerror, e.strerror) def check_output(self, nice, cmd, args, options, expected, extra_check): got = api.Command[cmd](*args, **options) -- cgit