예제 #1
0
 def test_update_with_path_new_keys(self):
     modname = setup_settings_file(SOME_DICT)
     config = Config({'VAR1': 'ORIGINAL'})
     config.update_with_path(modname, only_new_keys=True)
     self.assertEqual(config, {'VAR1': 'ORIGINAL', 'VAR2': 'val2'})
예제 #2
0
 def test_update_with_path(self):
     modname = setup_settings_file(SOME_DICT)
     config = Config()
     config.update_with_path(modname)
     self.assertEqual(config, {'VAR1': 'val1', 'VAR2': 'val2'})
예제 #3
0
 def test_update_with_path_allowed_keys(self):
     modname = setup_settings_file(SOME_DICT)
     config = Config()
     config.update_with_path(modname, allowed_keys=['VAR1'])
     self.assertEqual(config, {'VAR1': 'val1'})
예제 #4
0
 def test_update_with_path(self):
     modname = setup_settings_file(SOME_DICT)
     config = Config()
     config.update_with_path(modname)
     self.assertEqual(config, {'VAR1': 'val1', 'VAR2': 'val2'})
예제 #5
0
 def test_update_with_path_allowed_keys(self):
     modname = setup_settings_file(SOME_DICT)
     config = Config()
     config.update_with_path(modname, allowed_keys=['VAR1'])
     self.assertEqual(config, {'VAR1': 'val1'})
예제 #6
0
 def test_update_with_path_new_keys(self):
     modname = setup_settings_file(SOME_DICT)
     config = Config({'VAR1': 'ORIGINAL'})
     config.update_with_path(modname, only_new_keys=True)
     self.assertEqual(config, {'VAR1': 'ORIGINAL', 'VAR2': 'val2'})