"""Unit tests for Identity.""" import pytest from permissions.types import Identity @pytest.mark.parametrize( ('auth0_user_id', 'expected'), [ pytest.param('auth0|1234567890', False, id='correct_auth0_id'), pytest.param('', True, id='empty_auth0_id'), pytest.param('123e4567-e89b-12d3-a456-426614174000', True, id='id_eq_auth0_id'), ], ) def test_identity_is_pending(auth0_user_id: str, expected: bool) -> None: """Test Identity.is_pending().""" identity = Identity( id='123e4567-e89b-12d3-a456-426614174000', first_name='John', last_name='Doe', name='John Doe', email='foo@bar.baz', auth0_user_id=auth0_user_id, active='Y', user_types=['user'], default_brand='awal', ) actual = identity.is_pending() assert actual == expected