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

+1 -1
View File
@@ -553,7 +553,7 @@ class TestLink:
# a short path-bound ticket replaces the long Bearer JWT in the URL
assert "?token=gns3t_" in result["download_url"]
assert "Bearer" not in result["curl_command"]
path = f"/v3/projects/p1/links/l1/capture/file"
path = "/v3/projects/p1/links/l1/capture/file"
ticket = result["download_url"].split("token=")[1]
assert result["curl_command"] == f"curl -L -o capture.pcap '{result['download_url']}'"
redeemed = access_ticket_service.redeem_for_path(ticket, path)
+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
+1 -1
View File
@@ -89,7 +89,7 @@ async def benchmark_get_projects(base_url, headers, project_count, iterations=10
"""Benchmark GET /projects endpoint"""
print(f"\n{'=' * 60}")
print(f"GET /projects Performance Benchmark")
print("GET /projects Performance Benchmark")
print(f"{'=' * 60}")
print(f"Server: {base_url}")
print(f"{'=' * 60}\n")
+1 -1
View File
@@ -288,7 +288,7 @@ async def run_stress_test(
log.info(f"Device Type: {device_type}")
log.info(f"Rapid clients: {rapid_clients} (each {iterations_per_client} iterations)")
log.info(f"Long-lived clients: {long_lived_clients} (duration: {test_duration}s)")
log.info(f"Expected behavior: Rapid clients disconnect, long-lived clients unaffected")
log.info("Expected behavior: Rapid clients disconnect, long-lived clients unaffected")
log.info("=" * 70)
tasks: List[asyncio.Task] = []