Ticket #29727: test_bogus_lookup.py

File test_bogus_lookup.py, 319 bytes (added by Matthew Schinckel, 6 years ago)
Line 
1from django.test import SimpleTestCase
2from django.db.models import F
3from django.core.exceptions import FieldError
4
5from .models import Article
6
7
8class BogusLookup(SimpleTestCase):
9 def test_bogus_lookup(self):
10 with self.assertRaises(FieldError):
11 Article.objects.annotate(spam=F('author__foo'))
Back to Top