def test_validate_feed(self): # Test config = PluginCallConfiguration({constants.CONFIG_FEED: "http://localhost"}, {}) result, msg = configuration._validate_feed(config) # Verify self.assertTrue(result) self.assertTrue(msg is None)
def test_validate_feed_missing(self): # Test config = PluginCallConfiguration({}, {}) result, msg = configuration._validate_feed(config) # Verify self.assertTrue(result) self.assertTrue(msg is None)
def test_validate_feed(self): # Test config = PluginCallConfiguration({constants.CONFIG_FEED : 'http://localhost'}, {}) result, msg = configuration._validate_feed(config) # Verify self.assertTrue(result) self.assertTrue(msg is None)
def test_validate_feed_invalid(self): # Test config = PluginCallConfiguration({constants.CONFIG_FEED: "bad-feed"}, {}) result, msg = configuration._validate_feed(config) # Verify self.assertTrue(not result) self.assertTrue(msg is not None) self.assertTrue("bad-feed" in msg)