mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #23620 -- Used more specific assertions in the Django test suite.
This commit is contained in:
parent
c0c78f1b70
commit
f7969b0920
83 changed files with 419 additions and 429 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue