Merge pull request #2495 from loic/ticket19816

Fixed mistake in tests from commit 2039908. Refs #19816.
This commit is contained in:
Aymeric Augustin 2014-03-30 16:24:37 +02:00
commit 9723e999a0
2 changed files with 3 additions and 3 deletions

View File

@ -376,7 +376,7 @@ class ManyToManyTests(TestCase):
# ManyRelatedObjectsDescriptor.__set__. Refs #19816. # ManyRelatedObjectsDescriptor.__set__. Refs #19816.
self.a1.publications = [self.p1, self.p2] 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.a1.publications = qs
self.assertEqual(1, self.a1.publications.count()) self.assertEqual(1, self.a1.publications.count())
@ -388,7 +388,7 @@ class ManyToManyTests(TestCase):
# ReverseManyRelatedObjectsDescriptor.__set__. Refs #19816. # ReverseManyRelatedObjectsDescriptor.__set__. Refs #19816.
self.p1.article_set = [self.a1, self.a2] 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.p1.article_set = qs
self.assertEqual(1, self.p1.article_set.count()) self.assertEqual(1, self.p1.article_set.count())

View File

@ -92,7 +92,7 @@ class ManyToOneNullTests(TestCase):
# ForeignRelatedObjectsDescriptor.__set__. Refs #19816. # ForeignRelatedObjectsDescriptor.__set__. Refs #19816.
self.r2.article_set = [self.a2, self.a3] 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.r2.article_set = qs
self.assertEqual(1, self.r2.article_set.count()) self.assertEqual(1, self.r2.article_set.count())