def test_invalid(self): for s in (MISSING_ENABLED, MISSING_TYPE, MISSING_BASE_URL): fp = StringIO(s) config = Config(fp) for source_id, descriptor in config.items(): self.assertFalse(is_valid(source_id, descriptor))
def test_valid(self): fp = StringIO(VALID) config = Config(fp) for source_id, descriptor in config.items(): self.assertTrue(is_valid(source_id, descriptor))