def testPriorityOfFieldLookup(self, config_flag):
        """Tests whether attributes have higher priority than key-based lookup."""

        values = _parse_flags(
            './program {}/mini_config.py'.format(config_flag),
            lock_config=False)
        self.assertTrue(
            config_flags.GetValue('entry_with_collision', values.test_config))
    def testListOutOfRangeGet(self):
        """Tries to access out-of-range value in list."""

        test_config = mock_config.get_config()
        with self.assertRaises(IndexError):
            config_flags.GetValue('dict.list[2][1]', test_config)
    def testListExtraIndex(self):
        """Tries to index a non-indexable list element."""

        test_config = mock_config.get_config()
        with self.assertRaises(IndexError):
            config_flags.GetValue('dict.list[0][0]', test_config)