def test_no_working_dir(self): """Assert that we're not enabled when the working directory is not accessible. """ self.setup_helper(working_dir=False) plugin = EmailPluginBase(CONF) self.assertFalse(plugin.enabled())
def test_no_config(self): """Assert that we're not enabled when the configuration says we're not. """ self.setup_helper(config=False) plugin = EmailPluginBase(CONF) self.assertFalse(plugin.enabled())
def test_all_systems_go(self): """Assert that if we can get a working directory, and we can get an email sender, and we have the configuration enabled, that we are enabled. """ self.setup_helper() plugin = EmailPluginBase(CONF) self.assertTrue(plugin.enabled())
def test_no_smtp(self): """Assert that we're not enabled when smtp is misconfigured. """ self.setup_helper(smtp=False) plugin = EmailPluginBase(CONF) self.assertFalse(plugin.enabled())
def test_no_outbox(self): """Assert that we're not enabled when the outbox is not accessible.""" self.setup_helper(outbox=False) plugin = EmailPluginBase(CONF) self.assertFalse(plugin.enabled())