33import pytest
44from fastapi import Response
55
6- from fastapi_users import models , schemas
6+ from fastapi_users import models
77from fastapi_users .authentication import (
88 AuthenticationBackend ,
99 BearerTransport ,
1212from fastapi_users .authentication .strategy import StrategyDestroyNotSupportedError
1313from fastapi_users .authentication .transport .base import Transport
1414from fastapi_users .manager import BaseUserManager
15- from tests .conftest import MockStrategy , MockTransport , UserDB
15+ from tests .conftest import MockStrategy , MockTransport , UserModel
1616
1717
1818class MockTransportLogoutNotSupported (BearerTransport ):
1919 pass
2020
2121
22- class MockStrategyDestroyNotSupported (Strategy , Generic [schemas . UC , schemas . UD ]):
22+ class MockStrategyDestroyNotSupported (Strategy , Generic [models . UP ]):
2323 async def read_token (
2424 self , token : Optional [str ], user_manager : BaseUserManager [models .UP ]
25- ) -> Optional [schemas . UD ]:
25+ ) -> Optional [models . UP ]:
2626 return None
2727
28- async def write_token (self , user : schemas . UD ) -> str :
28+ async def write_token (self , user : models . UP ) -> str :
2929 return "TOKEN"
3030
31- async def destroy_token (self , token : str , user : schemas . UD ) -> None :
31+ async def destroy_token (self , token : str , user : models . UP ) -> None :
3232 raise StrategyDestroyNotSupportedError
3333
3434
@@ -55,7 +55,7 @@ def backend(
5555
5656@pytest .mark .asyncio
5757@pytest .mark .authentication
58- async def test_logout (backend : AuthenticationBackend , user : UserDB ):
58+ async def test_logout (backend : AuthenticationBackend , user : UserModel ):
5959 strategy = cast (Strategy , backend .get_strategy ())
6060 result = await backend .logout (strategy , user , "TOKEN" , Response ())
6161 assert result is None
0 commit comments