"""Test utils.""" import pytest from m2mconfig.utils import get_auth0_audience @pytest.mark.parametrize( "environment, expected_audience", [ pytest.param( "prod", "https://prod-ows.theorchard.io", id="prod returns the prod audience", ), pytest.param( "qa", "https://qa-ows.theorchard.io", id="qa returns the qa audience" ), pytest.param( "PROD", "https://qa-ows.theorchard.io", id="behavior is case-sensitive" ), pytest.param( "uat", "https://qa-ows.theorchard.io", id="uat returns the qa audience" ), pytest.param( "anything", "https://qa-ows.theorchard.io", id="anything other than prod still returns qa audience", ), ], ) def test_get_auth0_audience( environment: str, expected_audience: str, ) -> None: """Test get_auth0_audience.""" actual = get_auth0_audience(environment) assert actual == expected_audience