Remove list endpoint and related methods

This commit is contained in:
François Voron
2020-04-25 11:46:20 +02:00
parent f37e4b90df
commit a9ee467518
13 changed files with 5 additions and 134 deletions

View File

@ -155,9 +155,6 @@ def oauth_account3() -> BaseOAuthAccount:
@pytest.fixture
def mock_user_db(user, inactive_user, superuser) -> BaseUserDatabase:
class MockUserDatabase(BaseUserDatabase[UserDB]):
async def list(self) -> List[UserDB]:
return [user, inactive_user, superuser]
async def get(self, id: str) -> Optional[UserDB]:
if id == user.id:
return user
@ -193,9 +190,6 @@ def mock_user_db_oauth(
user_oauth, inactive_user_oauth, superuser_oauth
) -> BaseUserDatabase:
class MockUserDatabase(BaseUserDatabase[UserDBOAuth]):
async def list(self) -> List[UserDBOAuth]:
return [user_oauth, inactive_user_oauth, superuser_oauth]
async def get(self, id: str) -> Optional[UserDBOAuth]:
if id == user_oauth.id:
return user_oauth