File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -794,13 +794,11 @@ def test_list_databases(self):
794
794
self .assertIsInstance (cursor , CommandCursor )
795
795
helper_docs = list (cursor )
796
796
self .assertTrue (len (helper_docs ) > 0 )
797
- # sizeOnDisk can change between calls.
798
- for doc_list in (helper_docs , cmd_docs ):
799
- for doc in doc_list :
800
- doc .pop ("sizeOnDisk" , None )
801
- self .assertEqual (helper_docs , cmd_docs )
802
- for doc in helper_docs :
803
- self .assertIs (type (doc ), dict )
797
+ self .assertEqual (len (helper_docs ), len (cmd_docs ))
798
+ # PYTHON-3529 Some fields may change between calls, just compare names.
799
+ for helper_doc , cmd_doc in zip (helper_docs , cmd_docs ):
800
+ self .assertIs (type (helper_doc ), dict )
801
+ self .assertEqual (helper_doc .keys (), cmd_doc .keys ())
804
802
client = rs_or_single_client (document_class = SON )
805
803
self .addCleanup (client .close )
806
804
for doc in client .list_databases ():
You can’t perform that action at this time.
0 commit comments