mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-05-04 16:21:30 -07:00
Refactoring change by moving common logic to the module_utils
This commit is contained in:
parent
c66a5ac3c4
commit
10660cf885
4 changed files with 54 additions and 49 deletions
|
@ -35,33 +35,3 @@ def test_get_info_suffix(suffix, cursor_output, server_implementation):
|
|||
info = MySQL_Info(MagicMock(), cursor, server_implementation)
|
||||
|
||||
assert info.get_info([], [], False)['version']['suffix'] == suffix
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'server_implementation',
|
||||
[
|
||||
('mysql'),
|
||||
('mariadb'),
|
||||
]
|
||||
)
|
||||
def test_is_mariadb(server_implementation):
|
||||
cursor = MagicMock()
|
||||
|
||||
info = MySQL_Info(MagicMock(), cursor, server_implementation)
|
||||
|
||||
assert info.is_mariadb() == (server_implementation == "mariadb")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'server_implementation',
|
||||
[
|
||||
('mysql'),
|
||||
('mariadb'),
|
||||
]
|
||||
)
|
||||
def test_is_mysql(server_implementation):
|
||||
cursor = MagicMock()
|
||||
|
||||
info = MySQL_Info(MagicMock(), cursor, server_implementation)
|
||||
|
||||
assert info.is_mysql() == (server_implementation == "mysql")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue