forked from openlp/openlp
fixes
This commit is contained in:
parent
ca936f5e1a
commit
eb20838046
@ -57,13 +57,13 @@ class TestRegistry(TestCase):
|
|||||||
# WHEN I try to get back a non existent component
|
# WHEN I try to get back a non existent component
|
||||||
# THEN I will get an exception
|
# THEN I will get an exception
|
||||||
temp = Registry().get('test2')
|
temp = Registry().get('test2')
|
||||||
assert temp is False, 'None should have been returned for missing service'
|
assert temp is None, 'None should have been returned for missing service'
|
||||||
|
|
||||||
# WHEN I try to replace a component I should be allowed
|
# WHEN I try to replace a component I should be allowed
|
||||||
Registry().remove('test1')
|
Registry().remove('test1')
|
||||||
# THEN I will get an exception
|
# THEN I will get an exception
|
||||||
temp = Registry().get('test1')
|
temp = Registry().get('test1')
|
||||||
assert temp is False, 'None should have been returned for deleted service'
|
assert temp is None, 'None should have been returned for deleted service'
|
||||||
|
|
||||||
def test_registry_function(self):
|
def test_registry_function(self):
|
||||||
"""
|
"""
|
||||||
@ -142,7 +142,7 @@ class TestRegistry(TestCase):
|
|||||||
Registry().remove_function('test1', self.dummy_function_1)
|
Registry().remove_function('test1', self.dummy_function_1)
|
||||||
|
|
||||||
# THEN: The method should not be available.
|
# THEN: The method should not be available.
|
||||||
assert Registry().functions_list['test1'] is None, 'The function should not be in the dict anymore.'
|
assert Registry().functions_list['test1'] == [], 'The function should not be in the dict anymore.'
|
||||||
|
|
||||||
def dummy_function_1(self):
|
def dummy_function_1(self):
|
||||||
return "function_1"
|
return "function_1"
|
||||||
|
Loading…
Reference in New Issue
Block a user