Skip to content

Commit

Permalink
PYTHON-3529 Improve reliability of test_list_databases (#1120)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneHarvey committed Nov 17, 2022
1 parent cde9adf commit 1edbfad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_client.py
Expand Up @@ -791,6 +791,10 @@ def test_list_databases(self):
self.assertIsInstance(cursor, CommandCursor)
helper_docs = list(cursor)
self.assertTrue(len(helper_docs) > 0)
# sizeOnDisk can change between calls.
for doc_list in (helper_docs, cmd_docs):
for doc in doc_list:
doc.pop("sizeOnDisk", None)
self.assertEqual(helper_docs, cmd_docs)
for doc in helper_docs:
self.assertIs(type(doc), dict)
Expand Down

0 comments on commit 1edbfad

Please sign in to comment.