예제 #1
0
 def test_config_has_not_lower_case_variable(self):
     config = Config(self.root_path)
     config.load_from_pyfile('dummy_config.py')
     self.assertNotIn('lower_case', config)
예제 #2
0
 def test_failure_for_loading_config(self):
     config = Config(self.root_path)
     self.assertRaises(FileNotFoundError, config.load_from_pyfile,
                       'no_exists.py')
예제 #3
0
 def test_load_from_module(self):
     from tests import dummy_config
     config = Config(self.root_path)
     config.load_from_module(dummy_config)
     self.assertIn('UPPER_CASE', config)
예제 #4
0
 def test_load_from_pyfile(self):
     config = Config(self.root_path)
     config.load_from_pyfile('dummy_config.py')
     self.assertIn('UPPER_CASE', config)
예제 #5
0
 def test_constructor_set_root_path(self):
     config = Config(self.root_path)
     config.load_from_pyfile('dummy_config.py')
     self.assertIn('root_path', dir(config))
예제 #6
0
파일: test_apps.py 프로젝트: c-bata/kobin
 def test_config_has_not_lower_case_variable(self):
     config = Config(self.root_path)
     config.load_from_pyfile('dummy_config.py')
     self.assertNotIn('lower_case', config)
예제 #7
0
파일: test_apps.py 프로젝트: c-bata/kobin
 def test_load_from_pyfile(self):
     config = Config(self.root_path)
     config.load_from_pyfile('dummy_config.py')
     self.assertIn('UPPER_CASE', config)
예제 #8
0
파일: test_apps.py 프로젝트: c-bata/kobin
 def test_load_from_module(self):
     from tests import dummy_config
     config = Config(self.root_path)
     config.load_from_module(dummy_config)
     self.assertIn('UPPER_CASE', config)
예제 #9
0
파일: test_apps.py 프로젝트: c-bata/kobin
 def test_constructor_set_root_path(self):
     config = Config(self.root_path)
     config.load_from_pyfile('dummy_config.py')
     self.assertIn('root_path', dir(config))