コード例 #1
0
    def test_import_module_failure(self, mockload):
        i = Hook()
        i.load('/foo/bar.yml')
        i.import_module('hooks_test_module')

        self.mocked_facio_hooks_Hook_error.assert_called_with(
            'Failed to Load module: hooks_test_module')
コード例 #2
0
 def test_import_success(self, mock_importlib, mockload):
     i = Hook()
     i.load('/foo/bar.yml')
     i.import_module('path.to.module')
     self.mocked_facio_hooks_Hook_out.assert_called_with(
         'Loaded module: path.to.module')