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

Function test_write_token

tests/test_authentication_strategy_redis.py:104–110  ·  view source on GitHub ↗
(
    redis_strategy: RedisStrategy[UserModel, IDType], redis: RedisMock, user
)

Source from the content-addressed store, hash-verified

102@pytest.mark.authentication
103@pytest.mark.asyncio
104async def test_write_token(
105 redis_strategy: RedisStrategy[UserModel, IDType], redis: RedisMock, user
106):
107 token = await redis_strategy.write_token(user)
108
109 value = await redis.get(f"{redis_strategy.key_prefix}{token}")
110 assert value == str(user.id)
111
112
113@pytest.mark.authentication

Callers

nothing calls this directly

Calls 2

write_tokenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…