Пример #1
0
 def test_duplicate_global_flags(self):
     with self.assertRaises(DuplicateFlagException):
         add_flags_from_sources(sources=['flags.tests.test_settings'])
Пример #2
0
 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())
Пример #3
0
 def test_add_flags_from_sources(self):
     add_flags_from_sources(sources=['flags.tests.test_settings'])
     self.assertTrue(flags.settings.SOURCED_FLAGS['SOURCED_FLAG'])
Пример #4
0
 def test_add_flags_from_sources_non_existent(self):
     with self.assertRaises(ImportError):
         add_flags_from_sources(sources=['non.existent.module'])
Пример #5
0
 def ready(self):
     add_flags_from_sources()