This commit is contained in:
Darko Poljak 2017-09-01 14:11:58 +02:00
parent 759a917da9
commit 5213f343c0
2 changed files with 5 additions and 4 deletions

View file

@ -32,7 +32,7 @@ class Singleton(type):
instance = None instance = None
def __call__(cls, *args, **kwargs): def __call__(cls, *args, **kwargs):
if 'singleton' in kwargs and kwargs['singleton'] == False: if 'singleton' in kwargs and not kwargs['singleton']:
return super(Singleton, cls).__call__(*args, **kwargs) return super(Singleton, cls).__call__(*args, **kwargs)
else: else:
if not cls.instance: if not cls.instance:

View file

@ -63,9 +63,10 @@ class ConfigurationOptionsTestCase(test.CdistTestCase):
), ),
) )
for currval, newval, update_appends, expected in test_cases: for currval, newval, update_appends, expected in test_cases:
self.assertEqual(option.update_value(currval, newval, self.assertEqual(
update_appends=update_appends), option.update_value(currval, newval,
expected) update_appends=update_appends),
expected)
def test_StringOption(self): def test_StringOption(self):
option = cc.StringOption('test') option = cc.StringOption('test')