From 92eb90b064b2add38078ea5963ce85713b2d8441 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Tue, 9 Oct 2018 15:54:10 -0700 Subject: [PATCH] PYTHON-1654 Ignore $clusterTime in test_command assertion (cherry picked from commit d43ca118f91dda373356802ee8ec976d96c366b9) --- test/test_database.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/test_database.py b/test/test_database.py index dcb4dff820..92a187afc8 100644 --- a/test/test_database.py +++ b/test/test_database.py @@ -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