From eb84dada38dd278301a2e0b5894d28f0e7009c5b Mon Sep 17 00:00:00 2001 From: Alejandra <90076947+alejsdev@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:42:52 -0500 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Rename=20routes=20and=20te?= =?UTF-8?q?sts=20for=20consistency=20(#23)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/routes/organizations.py | 4 ++-- backend/app/tests/api/routes/test_organizations.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/app/api/routes/organizations.py b/backend/app/api/routes/organizations.py index 36df5125e32..18a0b528335 100644 --- a/backend/app/api/routes/organizations.py +++ b/backend/app/api/routes/organizations.py @@ -26,7 +26,7 @@ @router.get("/", response_model=OrganizationsPublic) -def get_organizations( +def read_organizations( session: SessionDep, current_user: CurrentUser, skip: int = 0, limit: int = 100 ) -> Any: """ @@ -58,7 +58,7 @@ def get_organizations( @router.get("/{org_id}", response_model=OrganizationWithUserPublic) -def get_organization( +def read_organization( session: SessionDep, current_user: CurrentUser, org_id: int ) -> Any: """ diff --git a/backend/app/tests/api/routes/test_organizations.py b/backend/app/tests/api/routes/test_organizations.py index 4eb18531a52..5b387fc2039 100644 --- a/backend/app/tests/api/routes/test_organizations.py +++ b/backend/app/tests/api/routes/test_organizations.py @@ -10,7 +10,7 @@ from app.tests.utils.user import create_user, user_authentication_headers -def test_get_organizations(client: TestClient, db: Session) -> None: +def test_read_organizations(client: TestClient, db: Session) -> None: # Create test data in the database using db fixture org1 = create_random_organization(db) org2 = create_random_organization(db) @@ -62,7 +62,7 @@ def test_get_organizations(client: TestClient, db: Session) -> None: assert organizations[0]["id"] == org3.id -def test_get_organization(client: TestClient, db: Session) -> None: +def test_read_organization(client: TestClient, db: Session) -> None: organization = create_random_organization(db) user = create_user(session=db, email="org2@fastapi.com", password="test123") add_user_to_organization( @@ -93,7 +93,7 @@ def test_get_organization(client: TestClient, db: Session) -> None: assert "full_name" in item["user"] -def test_get_organization_not_found(client: TestClient) -> None: +def test_read_organization_not_found(client: TestClient) -> None: user_auth_headers = user_authentication_headers( client=client, email=settings.FIRST_SUPERUSER,