Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Jan 12, 2023
1 parent a683006 commit 6775ee5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit_tests/databases/commands/test_connection_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from parameterized import parameterized

from superset.databases.commands.test_connection import get_log_connection_action
from superset.databases.ssh_tunnel.models import SSHTunnel


@parameterized.expand(
[
("foo", None, None, "foo"),
("foo", SSHTunnel, None, "foo.ssh_tunnel"),
("foo", SSHTunnel, Exception("oops"), "foo.Exception.ssh_tunnel"),
],
)
def test_get_log_connection_action(action, tunnel, exc, expected_result):
assert expected_result == get_log_connection_action(action, tunnel, exc)

0 comments on commit 6775ee5

Please sign in to comment.