'After setting LANGUAGE, the cache should be cleared and languages
previously valid should not be used (#14170).'

def test_cache_resetting(self):

    g = get_language_from_request
    r = self.rf.get('/')
    r.COOKIES = {}
    r.META = {'HTTP_ACCEPT_LANGUAGE': 'pt-br'}
    self.assertEqual('pt-br', g(r))
    with self.settings(LANGUAGES=[('en', 'English')]):
        self.assertNotEqual('pt-br', g(r))
