Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wfelipew committed Jan 4, 2024
1 parent 6eec740 commit 4c5e8f8
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/unit/plugins/modules/test_mysql_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,32 @@ def __cursor_return_value(input_parameter):

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" )
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" )
assert info.is_mysql() == (server_implementation == "mysql")

0 comments on commit 4c5e8f8

Please sign in to comment.