mirror of
https://github.com/django/django.git
synced 2025-08-31 07:47:37 +00:00
Replaced type-specific assertions with assertEqual().
Python docs say, "it's usually not necessary to invoke these methods directly."
This commit is contained in:
parent
e32265de1a
commit
6b4f018b2b
23 changed files with 93 additions and 102 deletions
|
@ -218,13 +218,13 @@ class TestCombinations(GrailTestData, PostgreSQLTestCase):
|
|||
|
||||
def test_query_or(self):
|
||||
searched = Line.objects.filter(dialogue__search=SearchQuery('kneecaps') | SearchQuery('nostrils'))
|
||||
self.assertSequenceEqual(set(searched), {self.verse1, self.verse2})
|
||||
self.assertEqual(set(searched), {self.verse1, self.verse2})
|
||||
|
||||
def test_query_multiple_or(self):
|
||||
searched = Line.objects.filter(
|
||||
dialogue__search=SearchQuery('kneecaps') | SearchQuery('nostrils') | SearchQuery('Sir Robin')
|
||||
)
|
||||
self.assertSequenceEqual(set(searched), {self.verse1, self.verse2, self.verse0})
|
||||
self.assertEqual(set(searched), {self.verse1, self.verse2, self.verse0})
|
||||
|
||||
def test_query_invert(self):
|
||||
searched = Line.objects.filter(character=self.minstrel, dialogue__search=~SearchQuery('kneecaps'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue