diff --git a/tests/core/test_module.py b/tests/core/test_module.py index 1a229a7..724dacc 100644 --- a/tests/core/test_module.py +++ b/tests/core/test_module.py @@ -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') diff --git a/tests/core/test_widget.py b/tests/core/test_widget.py index 5845f45..905768e 100644 --- a/tests/core/test_widget.py +++ b/tests/core/test_widget.py @@ -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