SSIA
--
Jan Cholasta
From c3f3ffd235b39fbdc61d8ae0b3f55eca97613499 Mon Sep 17 00:00:00 2001
From: Jan Cholasta
Date: Thu, 18 Aug 2016 10:04:59 +0200
Subject: [PATCH] tests: fix test_ipalib.test_frontend.test_Object
---
ipatests/test_ipalib/test_frontend.py | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/ipatests/test_ipalib/test_frontend.py b/ipatests/test_ipalib/test_frontend.py
index c3dd910..ac299e2 100644
--- a/ipatests/test_ipalib/test_frontend.py
+++ b/ipatests/test_ipalib/test_frontend.py
@@ -922,6 +922,9 @@ class test_Object(ClassChecker):
self.name = '%s_%s' % (obj_name, attr_name)
else:
self.name = name
+self.bases = (DummyAttribute,)
+self.version = '1'
+self.full_name = '{}/{}'.format(self.name, self.version)
self.param = frontend.create_param(attr_name)
def __clone__(self, attr_name):
@@ -940,15 +943,18 @@ class test_Object(ClassChecker):
methods_format = 'method_%d'
class FakeAPI(object):
-Method = NameSpace(
-get_attributes(cnt, methods_format)
-)
+def __init__(self):
+self._API__plugins = get_attributes(cnt, methods_format)
+self._API__default_map = {}
+self.Method = plugable.APINameSpace(self, DummyAttribute)
def __contains__(self, key):
return hasattr(self, key)
def __getitem__(self, key):
return getattr(self, key)
def is_production_mode(self):
return False
+def _get(self, plugin):
+return plugin
api = FakeAPI()
assert len(api.Method) == cnt * 3
--
2.7.4
--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code