Skip to content

Commit 0040395

Browse files
committed
fix more tests
1 parent 4cc7c69 commit 0040395

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

tests/unit/plugins/module_utils/test_mariadb_replication.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,12 @@ def test_stop_group_replication():
8686
def test_start_group_replication_fail():
8787
"""Test startgroupreplication function with failure."""
8888
from ansible_collections.community.mysql.plugins.modules.mysql_replication import startgroupreplication
89-
import pymysql
9089

9190
cursor = MockCursor(status="ERROR")
9291
module = type('obj', (object,), {
9392
'fail_json': lambda msg: None,
9493
})
9594

96-
# Mock the Warning exception
97-
pymysql.Warning = Exception
98-
9995
result = startgroupreplication(module, cursor, [], True)
10096

10197
assert result is False
@@ -104,16 +100,12 @@ def test_start_group_replication_fail():
104100
def test_stop_group_replication_fail():
105101
"""Test stopgroupreplication function with failure."""
106102
from ansible_collections.community.mysql.plugins.modules.mysql_replication import stopgroupreplication
107-
import pymysql
108103

109104
cursor = MockCursor(status="ERROR")
110105
module = type('obj', (object,), {
111106
'fail_json': lambda msg: None,
112107
})
113108

114-
# Mock the Warning exception
115-
pymysql.Warning = Exception
116-
117109
result = stopgroupreplication(module, cursor, True)
118110

119111
assert result is False

0 commit comments

Comments
 (0)