(
self, user_manager: UserManagerMock[UserModel], safe: bool, result: bool
)
| 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 |
nothing calls this directly
no test coverage detected