Skip to content

Commit 1edbfad

Browse files
authored
PYTHON-3529 Improve reliability of test_list_databases (#1120)
1 parent cde9adf commit 1edbfad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/test_client.py

+4
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,10 @@ def test_list_databases(self):
791791
self.assertIsInstance(cursor, CommandCursor)
792792
helper_docs = list(cursor)
793793
self.assertTrue(len(helper_docs) > 0)
794+
# sizeOnDisk can change between calls.
795+
for doc_list in (helper_docs, cmd_docs):
796+
for doc in doc_list:
797+
doc.pop("sizeOnDisk", None)
794798
self.assertEqual(helper_docs, cmd_docs)
795799
for doc in helper_docs:
796800
self.assertIs(type(doc), dict)

0 commit comments

Comments
 (0)