File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1339,10 +1339,17 @@ def test_changelist_view_list_editable_changed_objects_uses_filter(self):
13391339 self .assertEqual (response .status_code , 200 )
13401340 # Check only the first few characters of the pk since the UUID has
13411341 # dashes.
1342- self .assertIn (
1343- "{'$match': {'$expr': {'$in': ['$uuid', ('%s" % str (a .pk )[:8 ],
1344- context .captured_queries [4 ]["sql" ],
1345- )
1342+ try :
1343+ self .assertIn (
1344+ "{'$match': {'uuid': {'$in': ('%s" % str (a .pk )[:8 ],
1345+ context .captured_queries [4 ]["sql" ],
1346+ )
1347+ except AssertionError :
1348+ # pre https://github.com/mongodb/django-mongodb-backend/pull/373
1349+ self .assertIn (
1350+ "{'$match': {'$expr': {'$in': ['$uuid', ('%s" % str (a .pk )[:8 ],
1351+ context .captured_queries [4 ]["sql" ],
1352+ )
13461353
13471354 def test_list_editable_error_title (self ):
13481355 a = Swallow .objects .create (origin = "Swallow A" , load = 4 , speed = 1 )
You can’t perform that action at this time.
0 commit comments