Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/app/api/routes/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def update_password_me(


@router.get("/me", response_model=UserOut)
def read_user_me(session: SessionDep, current_user: CurrentUser) -> Any:
def read_user_me(current_user: CurrentUser) -> Any:
"""
Get current user.
"""
Expand Down
8 changes: 4 additions & 4 deletions backend/app/tests/api/routes/test_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def test_create_item(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
data = {"title": "Foo", "description": "Fighters"}
response = client.post(
Expand Down Expand Up @@ -39,7 +39,7 @@ def test_read_item(


def test_read_item_not_found(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
response = client.get(
f"{settings.API_V1_STR}/items/999",
Expand Down Expand Up @@ -96,7 +96,7 @@ def test_update_item(


def test_update_item_not_found(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
data = {"title": "Updated title", "description": "Updated description"}
response = client.put(
Expand Down Expand Up @@ -138,7 +138,7 @@ def test_delete_item(


def test_delete_item_not_found(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
response = client.delete(
f"{settings.API_V1_STR}/items/999",
Expand Down
14 changes: 7 additions & 7 deletions backend/app/tests/api/routes/test_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_get_existing_user_current_user(client: TestClient, db: Session) -> None


def test_get_existing_user_permissions_error(
client: TestClient, normal_user_token_headers: dict[str, str], db: Session
client: TestClient, normal_user_token_headers: dict[str, str]
) -> None:
r = client.get(
f"{settings.API_V1_STR}/users/999999",
Expand Down Expand Up @@ -165,7 +165,7 @@ def test_retrieve_users(


def test_update_user_me(
client: TestClient, normal_user_token_headers: dict[str, str], db: Session
client: TestClient, normal_user_token_headers: dict[str, str]
) -> None:
full_name = "Updated Name"
email = random_email()
Expand All @@ -182,7 +182,7 @@ def test_update_user_me(


def test_update_password_me(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
new_password = random_lower_string()
data = {
Expand Down Expand Up @@ -212,7 +212,7 @@ def test_update_password_me(


def test_update_password_me_incorrect_password(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
new_password = random_lower_string()
data = {"current_password": new_password, "new_password": new_password}
Expand Down Expand Up @@ -245,7 +245,7 @@ def test_update_user_me_email_exists(


def test_update_password_me_same_password_error(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
data = {
"current_password": settings.FIRST_SUPERUSER_PASSWORD,
Expand Down Expand Up @@ -335,7 +335,7 @@ def test_update_user(


def test_update_user_not_exists(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
data = {"full_name": "Updated_full_name"}
r = client.patch(
Expand Down Expand Up @@ -413,7 +413,7 @@ def test_delete_user_current_user(client: TestClient, db: Session) -> None:


def test_delete_user_not_found(
client: TestClient, superuser_token_headers: dict[str, str], db: Session
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
r = client.delete(
f"{settings.API_V1_STR}/users/99999999",
Expand Down
1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG001", # unused arguments in functions
]
ignore = [
"E501", # line too long, handled by black
Expand Down