1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
import unittest
from unittest import mock
from ...authentication.enterprise import Enterprise
class TestEnterprise(unittest.TestCase):
@mock.patch("auth0.authentication.enterprise.Enterprise.get")
def test_saml_metadata(self, mock_get):
e = Enterprise("my.domain.com", "cid")
e.saml_metadata()
mock_get.assert_called_with(url="https://my.domain.com/samlp/metadata/cid")
@mock.patch("auth0.authentication.enterprise.Enterprise.get")
def test_wsfed_metadata(self, mock_get):
e = Enterprise("my.domain.com", "cid")
e.wsfed_metadata()
mock_get.assert_called_with(
url=(
"https://my.domain.com/wsfed/FederationMetadata"
"/2007-06/FederationMetadata.xml"
)
)
|