Ejemplo 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'})
Ejemplo 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'})
Ejemplo 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'})
Ejemplo 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'})
Ejemplo 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'})
Ejemplo 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'})