def test_duplicate_global_flags(self): with self.assertRaises(DuplicateFlagException): add_flags_from_sources(sources=['flags.tests.test_settings'])
def test_get_flags(self): add_flags_from_sources(sources=['flags.tests.test_settings']) self.assertIn('GLOBAL_FLAG', get_flags()) self.assertIn('SOURCED_FLAG', get_flags())
def test_add_flags_from_sources(self): add_flags_from_sources(sources=['flags.tests.test_settings']) self.assertTrue(flags.settings.SOURCED_FLAGS['SOURCED_FLAG'])
def test_add_flags_from_sources_non_existent(self): with self.assertRaises(ImportError): add_flags_from_sources(sources=['non.existent.module'])
def ready(self): add_flags_from_sources()