Skip to content

Commit

Permalink
PYTHON-1654 Ignore $clusterTime in test_command assertion
Browse files Browse the repository at this point in the history
(cherry picked from commit d43ca11)
  • Loading branch information
ShaneHarvey committed Oct 9, 2018
1 parent 35badcb commit 92eb90b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/test_database.py
Expand Up @@ -434,13 +434,8 @@ def test_command(self):
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
Expand Down

0 comments on commit 92eb90b

Please sign in to comment.