Permalink
Browse files

Fixed mistake in tests from commit 2039908. Refs #19816.

  • Loading branch information...
1 parent a2407c9 commit da7ab8728c795e1853cea4215469ae3649664c6d @loic loic committed Mar 30, 2014
Showing with 3 additions and 3 deletions.
  1. +2 −2 tests/many_to_many/tests.py
  2. +1 −1 tests/many_to_one_null/tests.py
View
4 tests/many_to_many/tests.py
@@ -376,7 +376,7 @@ def test_forward_assign_with_queryset(self):
# ManyRelatedObjectsDescriptor.__set__. Refs #19816.
self.a1.publications = [self.p1, self.p2]
- qs = self.a1.publications.filter(id=self.a1.id)
+ qs = self.a1.publications.filter(title='The Python Journal')
self.a1.publications = qs
self.assertEqual(1, self.a1.publications.count())
@@ -388,7 +388,7 @@ def test_reverse_assign_with_queryset(self):
# ReverseManyRelatedObjectsDescriptor.__set__. Refs #19816.
self.p1.article_set = [self.a1, self.a2]
- qs = self.p1.article_set.filter(id=self.p1.id)
+ qs = self.p1.article_set.filter(headline='Django lets you build Web apps easily')
self.p1.article_set = qs
self.assertEqual(1, self.p1.article_set.count())
View
2 tests/many_to_one_null/tests.py
@@ -92,7 +92,7 @@ def test_assign_with_queryset(self):
# ForeignRelatedObjectsDescriptor.__set__. Refs #19816.
self.r2.article_set = [self.a2, self.a3]
- qs = self.r2.article_set.filter(id=self.a2.id)
+ qs = self.r2.article_set.filter(headline="Second")
self.r2.article_set = qs
self.assertEqual(1, self.r2.article_set.count())

0 comments on commit da7ab87

Please sign in to comment.