style: remove f-strings without placeholders

This commit is contained in:
Mark Paronyan committed 2026-10-01 19:57:46 +03:00
1 parent c9416d2569
commit 2dc7479d11
11 files changed
+16 -16

No files matched your search

+6 -6
View File
@@ -59,7 +59,7 @@ class TestACLRoutes:
await rbac_repo.create_ace(ace)
# add an ACE on /projects to allow user to create a project
path = f"/projects"
path = "/projects"
new_ace = {"path": path, "ace_type": "user", "user_id": str(test_user.user_id), "role_id": role_id}
response = await authorized_client.post(app.url_path_for("create_ace"), json=new_ace)
@@ -99,7 +99,7 @@ class TestACLRoutes:
async def test_get_ace(self, app: FastAPI, client: AsyncClient, db_session: AsyncSession) -> None:
rbac_repo = RbacRepository(db_session)
ace_in_db = await rbac_repo.get_ace_by_path(f"/projects")
ace_in_db = await rbac_repo.get_ace_by_path("/projects")
response = await client.get(app.url_path_for("get_ace", ace_id=ace_in_db.ace_id))
assert response.status_code == status.HTTP_200_OK
assert response.json()["ace_id"] == str(ace_in_db.ace_id)
@@ -115,13 +115,13 @@ class TestACLRoutes:
) -> None:
rbac_repo = RbacRepository(db_session)
ace_in_db = await rbac_repo.get_ace_by_path(f"/projects")
ace_in_db = await rbac_repo.get_ace_by_path("/projects")
update_ace = {"path": f"/appliances", "ace_type": "user", "user_id": str(test_user.user_id), "role_id": role_id}
update_ace = {"path": "/appliances", "ace_type": "user", "user_id": str(test_user.user_id), "role_id": role_id}
response = await client.put(app.url_path_for("update_ace", ace_id=ace_in_db.ace_id), json=update_ace)
assert response.status_code == status.HTTP_200_OK
updated_ace_in_db = await rbac_repo.get_ace(ace_in_db.ace_id)
assert updated_ace_in_db.path == f"/appliances"
assert updated_ace_in_db.path == "/appliances"
async def test_delete_ace(
self,
@@ -131,7 +131,7 @@ class TestACLRoutes:
) -> None:
rbac_repo = RbacRepository(db_session)
ace_in_db = await rbac_repo.get_ace_by_path(f"/appliances")
ace_in_db = await rbac_repo.get_ace_by_path("/appliances")
response = await client.delete(app.url_path_for("delete_ace", ace_id=ace_in_db.ace_id))
assert response.status_code == status.HTTP_204_NO_CONTENT