[tests] Make tests pass again
This commit is contained in:
parent
5e673482d3
commit
fd57af9325
2 changed files with 4 additions and 3 deletions
|
@ -17,7 +17,8 @@ class module(unittest.TestCase):
|
|||
self.anotherWidget = core.widget.Widget('more Widget content')
|
||||
|
||||
def test_loadinvalid_module(self):
|
||||
module = core.module.load(module_name=self.invalidModuleName)
|
||||
config = unittest.mock.MagicMock()
|
||||
module = core.module.load(module_name=self.invalidModuleName, config=config)
|
||||
self.assertEqual('core.module', module.__class__.__module__, 'module must be a module object')
|
||||
self.assertEqual('Error', module.__class__.__name__, 'an invalid module must be a core.module.Error')
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ class widget(unittest.TestCase):
|
|||
def test_callable_fulltext(self):
|
||||
newWidget = core.widget.Widget(full_text=self.someCallback)
|
||||
self.assertEqual(newWidget.full_text(), self.callbackReturnValue)
|
||||
self.someCallback.assert_called_once_with()
|
||||
self.someCallback.assert_called_once_with(newWidget)
|
||||
|
||||
def test_set_callable_fulltext(self):
|
||||
self.someWidget.full_text(self.someCallback)
|
||||
self.assertEqual(self.someWidget.full_text(), self.callbackReturnValue)
|
||||
self.someCallback.assert_called_once_with()
|
||||
self.someCallback.assert_called_once_with(self.someWidget)
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Reference in a new issue