MCPcopy Index your code
hub / github.com/fastapi-users/fastapi-users / test_is_active

Method test_is_active

tests/test_manager.py:160–170  ·  view source on GitHub ↗
(
        self, user_manager: UserManagerMock[UserModel], safe: bool, result: bool
    )

Source from the content-addressed store, hash-verified

158
159 @pytest.mark.parametrize("safe,result", [(True, True), (False, False)])
160 async def test_is_active(
161 self, user_manager: UserManagerMock[UserModel], safe: bool, result: bool
162 ):
163 user = UserCreate(
164 email="lancelot@camelot.b", password="guinevere", is_active=False
165 )
166 created_user = await user_manager.create(user, safe)
167 assert isinstance(created_user, UserModel)
168 assert created_user.is_active is result
169
170 assert user_manager.on_after_register.called is True
171
172
173@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 2

UserCreateClass · 0.90
createMethod · 0.45

Tested by

no test coverage detected