From 4c5e8f8bb1773d80b9f16a116b5e16c98cb32376 Mon Sep 17 00:00:00 2001 From: William Welter Date: Thu, 4 Jan 2024 18:33:41 +0000 Subject: [PATCH] Fix unit tests --- tests/unit/plugins/modules/test_mysql_info.py | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/unit/plugins/modules/test_mysql_info.py b/tests/unit/plugins/modules/test_mysql_info.py index 138bd018..d1fb0700 100644 --- a/tests/unit/plugins/modules/test_mysql_info.py +++ b/tests/unit/plugins/modules/test_mysql_info.py @@ -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")