Fix unit tests

This commit is contained in:
William Welter 2024-01-04 18:33:41 +00:00
parent 6eec7404b3
commit 4c5e8f8bb1

View file

@ -36,16 +36,32 @@ def test_get_info_suffix(suffix, cursor_output, 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" )
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")