Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wfelipew committed Jan 4, 2024
1 parent ed93655 commit 6eec740
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/unit/plugins/modules/test_mysql_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,17 @@ def __cursor_return_value(input_parameter):
info = MySQL_Info(MagicMock(), cursor, server_implementation)

assert info.get_info([], [], False)['version']['suffix'] == suffix

def test_is_mariadb(server_implementation):
cursor = MagicMock()

info = MySQL_Info(MagicMock(), cursor, server_implementation)

assert info.is_mariadb() == ( server_implementation == "mariadb" )

def test_is_mysql(server_implementation):
cursor = MagicMock()

info = MySQL_Info(MagicMock(), cursor, server_implementation)

assert info.is_mysql() == ( server_implementation == "mysql" )

0 comments on commit 6eec740

Please sign in to comment.