Skip to content

Commit d43ca11

Browse files
committed
PYTHON-1654 Ignore $clusterTime in test_command assertion
1 parent 9dae3d0 commit d43ca11

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/test_database.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -434,13 +434,8 @@ def test_command(self):
434434
first = db.command("buildinfo")
435435
second = db.command({"buildinfo": 1})
436436
third = db.command("buildinfo", 1)
437-
# The logicalTime and operationTime fields were introduced in MongoDB
438-
# 3.5. Their value can change from one command call to the next.
439-
for doc in (first, second, third):
440-
doc.pop("logicalTime", None)
441-
doc.pop("operationTime", None)
442-
self.assertEqual(first, second)
443-
self.assertEqual(second, third)
437+
self.assertEqualReply(first, second)
438+
self.assertEqualReply(second, third)
444439

445440
# We use 'aggregate' as our example command, since it's an easy way to
446441
# retrieve a BSON regex from a collection using a command. But until

0 commit comments

Comments
 (0)