@@ -18,52 +18,22 @@ def test_replica_set(self):
18
18
def mocked_command (command ):
19
19
if command == "hello" :
20
20
return {"setName" : "foo" }
21
- if command == "serverStatus" :
22
- return {"storageEngine" : {"name" : "wiredTiger" }}
23
21
raise Exception ("Unexpected command" )
24
22
25
23
with patch ("pymongo.synchronous.database.Database.command" , wraps = mocked_command ):
26
24
self .assertIs (connection .features .supports_transactions , True )
27
25
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
-
41
26
def test_sharded_cluster (self ):
42
- """A sharded cluster with wiredTiger storage engine supports them ."""
27
+ """A sharded cluster supports transactions ."""
43
28
44
29
def mocked_command (command ):
45
30
if command == "hello" :
46
31
return {"msg" : "isdbgrid" }
47
- if command == "serverStatus" :
48
- return {"storageEngine" : {"name" : "wiredTiger" }}
49
32
raise Exception ("Unexpected command" )
50
33
51
34
with patch ("pymongo.synchronous.database.Database.command" , wraps = mocked_command ):
52
35
self .assertIs (connection .features .supports_transactions , True )
53
36
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
-
67
37
def test_no_support (self ):
68
38
"""No support on a non-replica set, non-sharded cluster."""
69
39
0 commit comments