From e7a6d1055574d2dd892f414dbe993ee5782ab488 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 3 Nov 2011 06:42:17 -0400 Subject: 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 --- tests/test_ipalib/test_frontend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_ipalib/test_frontend.py') 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' -- cgit