'Test the language preference of two users'

def test_preference_user(self):

    users = ((1, 'nl'), (2, 'en'))
    for (pk, lang) in users:
        user = User.objects.get(pk=pk)
        profile = get_user_profile(user=user)
        req = self._get_request_with_user(user)
        self.assertEqual(profile.language, lang)
        UserenaLocaleMiddleware().process_request(req)
        self.assertEqual(req.LANGUAGE_CODE, lang)
