@@ -92,22 +92,18 @@ def test_none_filter_nullable_json_exact(self):
9292 [{"$match" : {"$and" : [{"value" : {"$exists" : True }}, {"value" : None }]}}],
9393 )
9494 self .assertQuerySetEqual (
95- NullableJSONModel .objects .filter (value = None ),
96- self .null_objs [:- 1 ],
95+ NullableJSONModel .objects .filter (value = None ), self .null_objs [:- 1 ], ordered = False
9796 )
9897
9998 def test_none_filter_nullable_json_in (self ):
10099 with self .assertNumQueries (1 ) as ctx :
101- list (NullableJSONModel .objects .filter (value__in = [None ]))
100+ objs = list (NullableJSONModel .objects .filter (value__in = [None ]))
102101 self .assertAggregateQuery (
103102 ctx .captured_queries [0 ]["sql" ],
104103 "lookup__nullablejsonmodel" ,
105104 [{"$match" : {"$and" : [{"value" : {"$exists" : True }}, {"value" : {"$in" : [None ]}}]}}],
106105 )
107- self .assertQuerySetEqual (
108- NullableJSONModel .objects .filter (value__in = [None ]),
109- self .null_objs [:- 1 ],
110- )
106+ self .assertQuerySetEqual (objs , self .null_objs [:- 1 ], ordered = False )
111107
112108 def test_none_filter_binary_operator_exact (self ):
113109 with self .assertNumQueries (1 ) as ctx :
@@ -126,7 +122,7 @@ def test_none_filter_binary_operator_exact(self):
126122 }
127123 ],
128124 )
129- self .assertQuerySetEqual (Book .objects .filter (title = None ), [])
125+ self .assertQuerySetEqual (Book .objects .filter (title = None ), [], ordered = False )
130126
131127 def test_none_filter_binary_operator_in (self ):
132128 with self .assertNumQueries (1 ) as ctx :
@@ -145,4 +141,4 @@ def test_none_filter_binary_operator_in(self):
145141 }
146142 ],
147143 )
148- self .assertQuerySetEqual (Book .objects .filter (title__in = [None ]), [])
144+ self .assertQuerySetEqual (Book .objects .filter (title__in = [None ]), [], ordered = False )
0 commit comments