summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-11-03 06:42:17 -0400
committerSimo Sorce <ssorce@redhat.com>2012-01-11 12:04:17 -0500
commit8d0b3e5cad80243fd94d5c7d76175fa2087f7fe9 (patch)
tree6862236dbbc104b275c33151e0d6b3d15ac675bf /tests
parent1183a9873a8578290971df614adf830bd73b5630 (diff)
downloadfreeipa.git-8d0b3e5cad80243fd94d5c7d76175fa2087f7fe9.tar.gz
freeipa.git-8d0b3e5cad80243fd94d5c7d76175fa2087f7fe9.tar.xz
freeipa.git-8d0b3e5cad80243fd94d5c7d76175fa2087f7fe9.zip
Finalize plugin initialization on demand.
This patch changes the way plugins are initialized. Instead of finalizing all the plugins at once, plugins are finalized only after they are accessed (currently applies to Command, Object and Attribute subclasses, only in CLI by default). This change provides significant performance boost, as only the plugins that are actually used are finalized. ticket 1336
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ipalib/test_frontend.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_ipalib/test_frontend.py b/tests/test_ipalib/test_frontend.py
index 0f6aecb3..b717a43a 100644
--- a/tests/test_ipalib/test_frontend.py
+++ b/tests/test_ipalib/test_frontend.py
@@ -942,7 +942,8 @@ class test_Object(ClassChecker):
parameters.Str('four', primary_key=True),
)
o = example3()
- e = raises(ValueError, o.set_api, api)
+ o.set_api(api)
+ e = raises(ValueError, o.finalize)
assert str(e) == \
'example3 (Object) has multiple primary keys: one, two, four'