Beispiel #1
0
 def test_load_error_obj_not_found(self):
     plugin = PluginEntry('category1', 'name1',
                          'unittest.mock:i_dont_exist')
     with pytest.raises(Exception) as exc_info:
         plugin.load()
     assert ('Plugin category1:name1 module `unittest.mock`' in
             str(exc_info.value))
     assert 'i_dont_exist' in str(exc_info.value)
Beispiel #2
0
 def test_load_error_module_not_found(self):
     plugin = PluginEntry('category1', 'name1', 'i_dont:exist')
     with pytest.raises(Exception) as exc_info:
         plugin.load()
     assert 'Plugin category1 module `i_dont`' in str(exc_info.value)