Skip to content

Commit eb84dad

Browse files
authored
♻️ Rename routes and tests for consistency (#23)
1 parent 102fa64 commit eb84dad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

backend/app/api/routes/organizations.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
@router.get("/", response_model=OrganizationsPublic)
29-
def get_organizations(
29+
def read_organizations(
3030
session: SessionDep, current_user: CurrentUser, skip: int = 0, limit: int = 100
3131
) -> Any:
3232
"""
@@ -58,7 +58,7 @@ def get_organizations(
5858

5959

6060
@router.get("/{org_id}", response_model=OrganizationWithUserPublic)
61-
def get_organization(
61+
def read_organization(
6262
session: SessionDep, current_user: CurrentUser, org_id: int
6363
) -> Any:
6464
"""

backend/app/tests/api/routes/test_organizations.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from app.tests.utils.user import create_user, user_authentication_headers
1111

1212

13-
def test_get_organizations(client: TestClient, db: Session) -> None:
13+
def test_read_organizations(client: TestClient, db: Session) -> None:
1414
# Create test data in the database using db fixture
1515
org1 = create_random_organization(db)
1616
org2 = create_random_organization(db)
@@ -62,7 +62,7 @@ def test_get_organizations(client: TestClient, db: Session) -> None:
6262
assert organizations[0]["id"] == org3.id
6363

6464

65-
def test_get_organization(client: TestClient, db: Session) -> None:
65+
def test_read_organization(client: TestClient, db: Session) -> None:
6666
organization = create_random_organization(db)
6767
user = create_user(session=db, email="[email protected]", password="test123")
6868
add_user_to_organization(
@@ -93,7 +93,7 @@ def test_get_organization(client: TestClient, db: Session) -> None:
9393
assert "full_name" in item["user"]
9494

9595

96-
def test_get_organization_not_found(client: TestClient) -> None:
96+
def test_read_organization_not_found(client: TestClient) -> None:
9797
user_auth_headers = user_authentication_headers(
9898
client=client,
9999
email=settings.FIRST_SUPERUSER,

0 commit comments

Comments
 (0)