PYTHON-1654 Ignore $clusterTime in test_command assertion

This commit is contained in:
Shane Harvey 2018-10-09 15:54:10 -07:00
parent 9dae3d06a2
commit d43ca118f9

View File

@ -434,13 +434,8 @@ class TestDatabase(IntegrationTest):
first = db.command("buildinfo")
second = db.command({"buildinfo": 1})
third = db.command("buildinfo", 1)
# The logicalTime and operationTime fields were introduced in MongoDB
# 3.5. Their value can change from one command call to the next.
for doc in (first, second, third):
doc.pop("logicalTime", None)
doc.pop("operationTime", None)
self.assertEqual(first, second)
self.assertEqual(second, third)
self.assertEqualReply(first, second)
self.assertEqualReply(second, third)
# We use 'aggregate' as our example command, since it's an easy way to
# retrieve a BSON regex from a collection using a command. But until