'Context variables can be retrieved from a list of contexts'

def test_inherited_context(self):

    response = self.client.get(u'/test_client_regress/request_data_extended/', data={u'foo': u'whiz'})
    self.assertEqual(response.context.__class__, ContextList)
    self.assertEqual(len(response.context), 2)
    self.assertTrue((u'get-foo' in response.context))
    self.assertEqual(response.context[u'get-foo'], u'whiz')
    self.assertEqual(response.context[u'request-foo'], u'whiz')
    self.assertEqual(response.context[u'data'], u'bacon')
    try:
        response.context[u'does-not-exist']
        self.fail(u'Should    not    be    able    to    retrieve    non-existent    key')
    except KeyError as e:
        self.assertEqual(e.args[0], u'does-not-exist')
