Skip to content

Commit

Permalink
Add two test and more debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
pcmxgti committed May 2, 2023
1 parent eaea7f0 commit 2872904
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,3 +1463,35 @@ def test_get_output_types():

ret = aws.get_output_types()
assert "json" in ret


@pytest.mark.parametrize(
"auth_properties,expected",
[
({}, False),
(None, False),
({"type": "OKTA"}, True),
({"type": "SAML2"}, False),
],
)
def test_is_local_auth(auth_properties, expected):
"""Test local auth method."""
from tokendito import okta

assert okta.is_local_auth(auth_properties) == expected


@pytest.mark.parametrize(
"auth_properties,expected",
[
({}, False),
(None, False),
({"type": "OKTA"}, False),
({"type": "SAML2"}, True),
],
)
def test_is_saml2_auth(auth_properties, expected):
"""Test saml2 auth method."""
from tokendito import okta

assert okta.is_saml2_auth(auth_properties) == expected

0 comments on commit 2872904

Please sign in to comment.