mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
70: Plugin.__repr__ now again returns 'module_name.class_name()' form; updated unit test
This commit is contained in:
parent
19dbd57141
commit
778a019129
@ -91,7 +91,7 @@ class Plugin(object):
|
||||
"""
|
||||
Returns a fully qualified <module><name> representation of the class.
|
||||
"""
|
||||
return '%s.%s' % (
|
||||
return '%s.%s()' % (
|
||||
self.__class__.__module__,
|
||||
self.__class__.__name__
|
||||
)
|
||||
|
@ -68,7 +68,7 @@ def test_Plugin():
|
||||
api = 'the api instance'
|
||||
p = plugable.Plugin()
|
||||
assert read_only(p, 'name') == 'Plugin'
|
||||
assert repr(p) == '%s.Plugin' % plugable.__name__
|
||||
assert repr(p) == '%s.Plugin()' % plugable.__name__
|
||||
assert read_only(p, 'api') is None
|
||||
raises(AssertionError, p.finalize, None)
|
||||
p.finalize(api)
|
||||
@ -79,7 +79,7 @@ def test_Plugin():
|
||||
pass
|
||||
p = some_plugin()
|
||||
assert read_only(p, 'name') == 'some_plugin'
|
||||
assert repr(p) == '%s.some_plugin' % __name__
|
||||
assert repr(p) == '%s.some_plugin()' % __name__
|
||||
assert read_only(p, 'api') is None
|
||||
raises(AssertionError, p.finalize, None)
|
||||
p.finalize(api)
|
||||
|
Loading…
Reference in New Issue
Block a user