import pytest from campaigns.api.auth import get_profile_id from campaigns.auth.exceptions import NotAuthenticated def test_get_profile_id_empty() -> None: with pytest.raises(NotAuthenticated, match="Missing `Orchard-Profile-Id` header."): get_profile_id(None) def test_get_profile_id_invalid_value() -> None: with pytest.raises( NotAuthenticated, match="Invalid `Orchard-Profile-Id` header value." ): get_profile_id("invalid") def test_get_profile_id() -> None: assert get_profile_id("10000") == 10000