def test_clean_up(self): p = plugins.PluginManagerBase() with self.assertRaises(NotImplementedError): p.clean_up()
def test_reset(self): p = plugins.PluginManagerBase() with self.assertRaises(NotImplementedError): p.reset()
def test_finalise(self): p = plugins.PluginManagerBase() with self.assertRaises(NotImplementedError): p.finalise()
def test_log_files(self): p = plugins.PluginManagerBase() with self.assertRaises(NotImplementedError): p.log_files()
def test_log_format_property(self): mock_collection_object = mock.Mock() mock_collection_object.log_format = 'log-format' p = plugins.PluginManagerBase(collection_object=mock_collection_object) self.assertEqual(p.log_format, 'log-format')
def test_logs_dir_property(self): mock_collection_object = mock.Mock() mock_collection_object.logs_dir = 'my-logs' p = plugins.PluginManagerBase(collection_object=mock_collection_object) self.assertEqual(p.logs_dir, 'my-logs')
def test_collection_property(self): mock_collection_object = mock.Mock() mock_collection_object.collection = 'my-collection' p = plugins.PluginManagerBase(collection_object=mock_collection_object) self.assertEqual(p.collection, 'my-collection')
def test_configure_plugin(self): p = plugins.PluginManagerBase() with self.assertRaises(NotImplementedError): p.configure_plugin()
def test__init__(self): p = plugins.PluginManagerBase(collection_object='hello') self.assertEqual(p.managed_name, 'DEFAULT') self.assertEqual(p.collection_object, 'hello')