@@ -18,52 +18,22 @@ def test_replica_set(self):
1818 def mocked_command (command ):
1919 if command == "hello" :
2020 return {"setName" : "foo" }
21- if command == "serverStatus" :
22- return {"storageEngine" : {"name" : "wiredTiger" }}
2321 raise Exception ("Unexpected command" )
2422
2523 with patch ("pymongo.synchronous.database.Database.command" , wraps = mocked_command ):
2624 self .assertIs (connection .features .supports_transactions , True )
2725
28- def test_replica_set_other_storage_engine (self ):
29- """No support on a non-wiredTiger replica set."""
30-
31- def mocked_command (command ):
32- if command == "hello" :
33- return {"setName" : "foo" }
34- if command == "serverStatus" :
35- return {"storageEngine" : {"name" : "other" }}
36- raise Exception ("Unexpected command" )
37-
38- with patch ("pymongo.synchronous.database.Database.command" , wraps = mocked_command ):
39- self .assertIs (connection .features .supports_transactions , False )
40-
4126 def test_sharded_cluster (self ):
42- """A sharded cluster with wiredTiger storage engine supports them ."""
27+ """A sharded cluster supports transactions ."""
4328
4429 def mocked_command (command ):
4530 if command == "hello" :
4631 return {"msg" : "isdbgrid" }
47- if command == "serverStatus" :
48- return {"storageEngine" : {"name" : "wiredTiger" }}
4932 raise Exception ("Unexpected command" )
5033
5134 with patch ("pymongo.synchronous.database.Database.command" , wraps = mocked_command ):
5235 self .assertIs (connection .features .supports_transactions , True )
5336
54- def test_sharded_cluster_other_storage_engine (self ):
55- """No support on a non-wiredTiger shared cluster."""
56-
57- def mocked_command (command ):
58- if command == "hello" :
59- return {"msg" : "isdbgrid" }
60- if command == "serverStatus" :
61- return {"storageEngine" : {"name" : "other" }}
62- raise Exception ("Unexpected command" )
63-
64- with patch ("pymongo.synchronous.database.Database.command" , wraps = mocked_command ):
65- self .assertIs (connection .features .supports_transactions , False )
66-
6737 def test_no_support (self ):
6838 """No support on a non-replica set, non-sharded cluster."""
6939
0 commit comments