def testListOutOfRangeSet(self): """Tries to override out-of-range value in list.""" test_config = mock_config.get_config() with self.assertRaises(config_flags.UnsupportedOperationError): config_flags.SetValue('dict.list[2][1]', test_config, -1)
def testReadingSettingExistingKeyInDict(self): """Tests setting non existing key from dict inside config.""" test_config = mock_config.get_config() with self.assertRaises(KeyError): config_flags.SetValue('dict.not_existing_key.key', test_config, 1)
def testEmptyKey(self): """Tests calling an empty key update.""" test_config = mock_config.get_config() with self.assertRaises(ValueError): config_flags.SetValue('', test_config, None)
def testReadingNonExistingKey(self): """Tests reading non existing key from config.""" test_config = mock_config.get_config() with self.assertRaises(config_flags.UnsupportedOperationError): config_flags.SetValue('dict.not_existing_key', test_config, 1)