diff options
| author | Berker Peksag <berker.peksag@gmail.com> | 2014-10-28 12:02:56 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-11-03 11:56:37 -0500 |
| commit | f7969b0920c403118656f6bfec58d6454d79ef1a (patch) | |
| tree | 866df7de0524251323fef2b4262e672150d95f00 /tests/generic_relations_regress | |
| parent | c0c78f1b707f825eee974c65515a837f8cf46e66 (diff) | |
Fixed #23620 -- Used more specific assertions in the Django test suite.
Diffstat (limited to 'tests/generic_relations_regress')
| -rw-r--r-- | tests/generic_relations_regress/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/generic_relations_regress/tests.py b/tests/generic_relations_regress/tests.py index 2804530f84..39dfa47f68 100644 --- a/tests/generic_relations_regress/tests.py +++ b/tests/generic_relations_regress/tests.py @@ -72,12 +72,12 @@ class GenericRelationTests(TestCase): # search with a non-matching note and a matching org name qs = Contact.objects.filter(Q(notes__note__icontains=r'other note') | Q(organizations__name__icontains=r'org name')) - self.assertTrue(org_contact in qs) + self.assertIn(org_contact, qs) # search again, with the same query parameters, in reverse order qs = Contact.objects.filter( Q(organizations__name__icontains=r'org name') | Q(notes__note__icontains=r'other note')) - self.assertTrue(org_contact in qs) + self.assertIn(org_contact, qs) def test_join_reuse(self): qs = Person.objects.filter( |
