@@ -187,17 +187,6 @@ def test_filter_unsupported_lookups(self):
187187 self .assertCountEqual (MuseumExhibit .objects .filter (** kwargs ), [])
188188 self .assertIn (f"'field': '{ lookup } '" , captured_queries [0 ]["sql" ])
189189
190- def test_all_filter (self ):
191- self .assertCountEqual (
192- MuseumExhibit .objects .filter (sections__section_number__all = [1 , 2 ]), [self .wonders ]
193- )
194-
195- def test_contained_by (self ):
196- self .assertCountEqual (
197- MuseumExhibit .objects .filter (sections__section_number__contained_by = [1 , 2 , 3 ]),
198- [self .egypt , self .new_descoveries , self .wonders , self .lost_empires ],
199- )
200-
201190 def test_len_filter (self ):
202191 self .assertCountEqual (MuseumExhibit .objects .filter (sections__len = 10 ), [])
203192 self .assertCountEqual (
@@ -310,9 +299,8 @@ def test_foreign_field_exact(self):
310299 self .assertCountEqual (qs , [self .egypt_tour , self .wonders_tour ])
311300
312301 def test_foreign_field_with_slice (self ):
313- # Only wonders exhibit has exactly two sections, and this slice matches first two
314- qs = Tour .objects .filter (exhibit__sections__0_2__section_number__all = [1 , 2 ])
315- self .assertEqual (list (qs ), [self .wonders_tour ])
302+ qs = Tour .objects .filter (exhibit__sections__0_2__section_number__in = [1 , 2 ])
303+ self .assertCountEqual (qs , [self .wonders_tour , self .egypt_tour ])
316304
317305 def test_subquery_section_number_lt (self ):
318306 subq = ExhibitAudit .objects .filter (
@@ -323,13 +311,6 @@ def test_subquery_section_number_lt(self):
323311 [self .egypt , self .wonders , self .new_descoveries ],
324312 )
325313
326- def test_check_all_subquery (self ):
327- subquery = ExhibitAudit .objects .filter (reviewed = True ).values_list (
328- "related_section_number" , flat = True
329- )
330- result = MuseumExhibit .objects .filter (sections__section_number__all = subquery )
331- self .assertCountEqual (result , [self .wonders ])
332-
333314 def test_check_in_subquery (self ):
334315 subquery = ExhibitAudit .objects .filter (reviewed = True ).values_list (
335316 "related_section_number" , flat = True
0 commit comments