示例#1
0
 def test_validate_config_mapping(self):
     master_config = manager.from_string(self.config)
     other_config = manager.from_string(NamedConfigTestCase.config)
     config_mapping = {'other': other_config, MASTER_NAMESPACE: master_config}
     result = list(config_parse.validate_config_mapping(config_mapping))
     assert_equal(len(result), 2)
     assert_equal(result[0][0], MASTER_NAMESPACE)
     assert_equal(result[1][0], 'other')
示例#2
0
 def test_validate_config_mapping(self):
     master_config = self.config
     other_config = TestNamedConfig.config
     config_mapping = {
         'other': other_config,
         MASTER_NAMESPACE: master_config,
     }
     result = list(config_parse.validate_config_mapping(config_mapping))
     assert_equal(len(result), 2)
     assert_equal(result[0][0], MASTER_NAMESPACE)
     assert_equal(result[1][0], 'other')
示例#3
0
 def test_validate_config_mapping(self):
     master_config = manager.from_string(self.config)
     other_config = manager.from_string(NamedConfigTestCase.config)
     config_mapping = {
         'other': other_config,
         MASTER_NAMESPACE: master_config
     }
     result = list(config_parse.validate_config_mapping(config_mapping))
     assert_equal(len(result), 2)
     assert_equal(result[0][0], MASTER_NAMESPACE)
     assert_equal(result[1][0], 'other')
示例#4
0
 def test_validate_config_mapping(self):
     master_config = self.config
     other_config = TestNamedConfig.config
     config_mapping = {
         'other': other_config,
         MASTER_NAMESPACE: master_config,
     }
     result = list(config_parse.validate_config_mapping(config_mapping))
     assert_equal(len(result), 2)
     assert_equal(result[0][0], MASTER_NAMESPACE)
     assert_equal(result[1][0], 'other')
示例#5
0
 def test_validate_config_mapping_missing_master(self):
     config_mapping = {'other': mock.Mock()}
     seq = config_parse.validate_config_mapping(config_mapping)
     exception = assert_raises(ConfigError, list, seq)
     assert_in('requires a MASTER namespace', str(exception))
示例#6
0
 def test_validate_config_mapping_missing_master(self):
     config_mapping = {'other': mock.Mock()}
     seq = config_parse.validate_config_mapping(config_mapping)
     exception = assert_raises(ConfigError, list, seq)
     assert_in('requires a MASTER namespace', str(exception))