Refactoring code for modular approach

This commit is contained in:
2025-09-11 20:59:40 +02:00
parent fca389cff4
commit 900229d452
17 changed files with 850 additions and 125 deletions

View File

@@ -2,6 +2,8 @@
import pytest
import time
from models.database_models import Product
class TestPerformance:
def test_product_list_performance(self, client, auth_headers, db):
@@ -22,7 +24,7 @@ class TestPerformance:
# Time the request
start_time = time.time()
response = client.get("/api/v1/products?limit=100", headers=auth_headers)
response = client.get("/api/v1/product?limit=100", headers=auth_headers)
end_time = time.time()
assert response.status_code == 200
@@ -48,7 +50,7 @@ class TestPerformance:
# Time search request
start_time = time.time()
response = client.get("/api/v1/products?search=Searchable", headers=auth_headers)
response = client.get("/api/v1/product?search=Searchable", headers=auth_headers)
end_time = time.time()
assert response.status_code == 200