@@ -106,7 +106,7 @@ def setUpTestData(cls):
106106 ),
107107 ],
108108 )
109- cls .new_descoveries = Exhibit .objects .create (
109+ cls .new_discoveries = Exhibit .objects .create (
110110 name = "New Discoveries" ,
111111 sections = [
112112 Section (
@@ -175,7 +175,7 @@ def test_nested_array_index(self):
175175
176176 def test_array_slice (self ):
177177 self .assertSequenceEqual (
178- Exhibit .objects .filter (sections__0_1__number = 2 ), [self .new_descoveries ]
178+ Exhibit .objects .filter (sections__0_1__number = 2 ), [self .new_discoveries ]
179179 )
180180
181181 def test_filter_unsupported_lookups_in_json (self ):
@@ -190,7 +190,7 @@ def test_len(self):
190190 self .assertCountEqual (Exhibit .objects .filter (sections__len = 10 ), [])
191191 self .assertCountEqual (
192192 Exhibit .objects .filter (sections__len = 1 ),
193- [self .egypt , self .new_descoveries ],
193+ [self .egypt , self .new_discoveries ],
194194 )
195195 # Nested EMF
196196 self .assertCountEqual (
@@ -210,26 +210,26 @@ def test_in(self):
210210 )
211211 self .assertCountEqual (
212212 Exhibit .objects .filter (sections__number__in = [2 ]),
213- [self .new_descoveries , self .wonders ],
213+ [self .new_discoveries , self .wonders ],
214214 )
215215 self .assertCountEqual (Exhibit .objects .filter (sections__number__in = [3 ]), [])
216216
217217 def test_iexact (self ):
218218 self .assertCountEqual (
219219 Exhibit .objects .filter (sections__artifacts__0__name__iexact = "lightHOuse of aLexandriA" ),
220- [self .new_descoveries , self .wonders ],
220+ [self .new_discoveries , self .wonders ],
221221 )
222222
223223 def test_gt (self ):
224224 self .assertCountEqual (
225225 Exhibit .objects .filter (sections__number__gt = 1 ),
226- [self .new_descoveries , self .wonders ],
226+ [self .new_discoveries , self .wonders ],
227227 )
228228
229229 def test_gte (self ):
230230 self .assertCountEqual (
231231 Exhibit .objects .filter (sections__number__gte = 1 ),
232- [self .egypt , self .new_descoveries , self .wonders ],
232+ [self .egypt , self .new_discoveries , self .wonders ],
233233 )
234234
235235 def test_lt (self ):
@@ -240,7 +240,7 @@ def test_lt(self):
240240 def test_lte (self ):
241241 self .assertCountEqual (
242242 Exhibit .objects .filter (sections__number__lte = 2 ),
243- [self .egypt , self .wonders , self .new_descoveries ],
243+ [self .egypt , self .wonders , self .new_discoveries ],
244244 )
245245
246246 def test_querying_array_not_allowed (self ):
@@ -296,11 +296,11 @@ def test_subquery_numeric_lookups(self):
296296 section_number__in = models .OuterRef ("sections__number" )
297297 ).values ("section_number" )[:1 ]
298298 tests = [
299- ("exact" , [self .egypt , self .new_descoveries , self .wonders ]),
299+ ("exact" , [self .egypt , self .new_discoveries , self .wonders ]),
300300 ("lt" , []),
301- ("lte" , [self .egypt , self .new_descoveries , self .wonders ]),
301+ ("lte" , [self .egypt , self .new_discoveries , self .wonders ]),
302302 ("gt" , [self .wonders ]),
303- ("gte" , [self .egypt , self .new_descoveries , self .wonders ]),
303+ ("gte" , [self .egypt , self .new_discoveries , self .wonders ]),
304304 ]
305305 for lookup , expected in tests :
306306 with self .subTest (lookup = lookup ):
@@ -310,28 +310,28 @@ def test_subquery_numeric_lookups(self):
310310 def test_subquery_in_lookup (self ):
311311 subquery = Audit .objects .filter (reviewed = True ).values_list ("section_number" , flat = True )
312312 result = Exhibit .objects .filter (sections__number__in = subquery )
313- self .assertCountEqual (result , [self .wonders , self .new_descoveries , self .egypt ])
313+ self .assertCountEqual (result , [self .wonders , self .new_discoveries , self .egypt ])
314314
315315 def test_array_as_rhs (self ):
316316 result = Exhibit .objects .filter (main_section__number__in = models .F ("sections__number" ))
317- self .assertCountEqual (result , [self .new_descoveries ])
317+ self .assertCountEqual (result , [self .new_discoveries ])
318318
319319 def test_array_annotation_lookup (self ):
320320 result = Exhibit .objects .annotate (section_numbers = models .F ("main_section__number" )).filter (
321321 section_numbers__in = models .F ("sections__number" )
322322 )
323- self .assertCountEqual (result , [self .new_descoveries ])
323+ self .assertCountEqual (result , [self .new_discoveries ])
324324
325325 def test_array_as_rhs_for_arrayfield_lookups (self ):
326326 tests = [
327327 ("exact" , [self .wonders ]),
328- ("lt" , [self .new_descoveries ]),
329- ("lte" , [self .wonders , self .new_descoveries ]),
328+ ("lt" , [self .new_discoveries ]),
329+ ("lte" , [self .wonders , self .new_discoveries ]),
330330 ("gt" , [self .egypt , self .lost_empires ]),
331331 ("gte" , [self .egypt , self .wonders , self .lost_empires ]),
332- ("overlap" , [self .egypt , self .wonders , self .new_descoveries ]),
332+ ("overlap" , [self .egypt , self .wonders , self .new_discoveries ]),
333333 ("contained_by" , [self .wonders ]),
334- ("contains" , [self .egypt , self .wonders , self .new_descoveries , self .lost_empires ]),
334+ ("contains" , [self .egypt , self .wonders , self .new_discoveries , self .lost_empires ]),
335335 ]
336336 for lookup , expected in tests :
337337 with self .subTest (lookup = lookup ):
@@ -350,7 +350,7 @@ def test_array_annotation_index(self):
350350 result = Exhibit .objects .annotate (section_numbers = models .F ("sections__number" )).filter (
351351 section_numbers__0 = 1
352352 )
353- self .assertCountEqual (result , [self .new_descoveries , self .egypt ])
353+ self .assertCountEqual (result , [self .new_discoveries , self .egypt ])
354354
355355 def test_array_annotation (self ):
356356 qs = Exhibit .objects .annotate (section_numbers = models .F ("sections__number" )).order_by ("name" )
0 commit comments