Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated null_queries tests to avoid clashing with the __second lookup.

  • Loading branch information...
commit 104d82a7778cf3f0f5d03dfa53709c26df45daad 1 parent c01bbb3
@aaugustin aaugustin authored
View
3  tests/regressiontests/null_queries/models.py
@@ -28,4 +28,5 @@ class OuterB(models.Model):
class Inner(models.Model):
first = models.ForeignKey(OuterA)
- second = models.ForeignKey(OuterB, null=True)
+ # second would clash with the __second lookup.
+ third = models.ForeignKey(OuterB, null=True)
View
6 tests/regressiontests/null_queries/tests.py
@@ -55,17 +55,17 @@ def test_reverse_relations(self):
"""
obj = OuterA.objects.create()
self.assertQuerysetEqual(
- OuterA.objects.filter(inner__second=None),
+ OuterA.objects.filter(inner__third=None),
['<OuterA: OuterA object>']
)
self.assertQuerysetEqual(
- OuterA.objects.filter(inner__second__data=None),
+ OuterA.objects.filter(inner__third__data=None),
['<OuterA: OuterA object>']
)
inner_obj = Inner.objects.create(first=obj)
self.assertQuerysetEqual(
- Inner.objects.filter(first__inner__second=None),
+ Inner.objects.filter(first__inner__third=None),
['<Inner: Inner object>']
)
Please sign in to comment.
Something went wrong with that request. Please try again.