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 <mbasti@redhat.com>
This commit is contained in:
Lenka Doudova
2016-08-23 16:14:50 +02:00
committed by Martin Basti
parent 774e4e479d
commit ec0a58e484

View File

@@ -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: