Esempio n. 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'})
Esempio n. 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'})
Esempio n. 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'})
Esempio n. 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'})
Esempio n. 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'})
Esempio n. 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'})