def test_values_list_exception(self):
        expected_message = "Cannot resolve keyword 'notafield' into field. Choices are: %s"

        self.assertRaisesMessage(FieldError,
                                 expected_message % ', '.join(Reporter._meta.get_all_field_names()),
                                 Article.objects.values_list,
                                 'reporter__notafield')
        self.assertRaisesMessage(FieldError,
                                 expected_message % ', '.join(['EXTRA',] + Article._meta.get_all_field_names()),
                                 Article.objects.extra(select={'EXTRA': 'EXTRA_SELECT'}).values_list,
                                 'notafield')
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/modeltests/many_to_one/tests.py/ManyToOneTests.test_values_list_exception/original