From ec0a58e4845beeb14de747dbc841b5b3816a1595 Mon Sep 17 00:00:00 2001 From: Lenka Doudova Date: Tue, 23 Aug 2016 16:14:50 +0200 Subject: [PATCH] Tests: Failing tests in test_ipalib/test_plugable Tests test_Registry and test_API are failing, both due to changes made during thin client implementation. Partial fix for [1], complete fix for [2]. [1] https://fedorahosted.org/freeipa/ticket/6191 [2] https://fedorahosted.org/freeipa/ticket/6186 Reviewed-By: Martin Basti --- ipatests/test_ipalib/test_plugable.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ipatests/test_ipalib/test_plugable.py b/ipatests/test_ipalib/test_plugable.py index e8e867d85..0ea02a71b 100644 --- a/ipatests/test_ipalib/test_plugable.py +++ b/ipatests/test_ipalib/test_plugable.py @@ -118,7 +118,7 @@ def test_Registry(): # a class: p = plugin1() e = raises(TypeError, r(), p) - assert str(e) == 'plugin must be a class; got %r' % p + assert str(e) == 'plugin must be callable; got %r' % p # Check that registration works r()(plugin1) @@ -229,7 +229,7 @@ class test_API(ClassChecker): base_name = get_base_name(b) base = locals()[base_name] ns = getattr(api, base_name) - assert isinstance(ns, plugable.NameSpace) + assert isinstance(ns, plugable.APINameSpace) assert read_only(api, base_name) is ns assert len(ns) == 3 for p in range(3): @@ -239,7 +239,6 @@ class test_API(ClassChecker): assert isinstance(inst, base) assert isinstance(inst, plugin) assert inst.name == plugin_name - assert read_only(ns, plugin_name) is inst assert inst.method(7) == 7 + b # Test that calling finilize again raises AssertionError: