'Test that conflicting contexts are resolved by precedence.'

def testConflictingContexts(self):

    conf = config_lib.GrrConfigManager()
    conf.DEFINE_integer('Section1.test', 0, 'An    integer')
    conf.DEFINE_context('Client    Context')
    conf.DEFINE_context('Platform:Windows')
    conf.DEFINE_context('Extra    Context')
    conf.Initialize(parser=config_lib.YamlParser, data='\n\nSection1.test:    2\n\nClient    Context:\n        Section1.test:    6\n\nPlatform:Windows:\n        Section1.test:    10\n\nExtra    Context:\n        Section1.test:    15\n')
    self.assertEqual(conf.Get('Section1.test'), 2)
    self.assertEqual(conf.Get('Section1.test', context=['Client    Context']), 6)
    self.assertEqual(conf.Get('Section1.test', context=['Client    Context', 'Platform:Windows']), 10)
    self.assertEqual(conf.Get('Section1.test', context=['Platform:Windows', 'Client    Context']), 6)
