Application fully migrated to modular approach
This commit is contained in:
@@ -18,7 +18,7 @@ class TestStatsAPI:
|
||||
|
||||
def test_get_marketplace_stats(self, client, auth_headers, test_product):
|
||||
"""Test getting marketplace statistics"""
|
||||
response = client.get("/api/v1/stats/marketplace-stats", headers=auth_headers)
|
||||
response = client.get("/api/v1/stats/marketplace", headers=auth_headers)
|
||||
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
@@ -27,7 +27,7 @@ class TestStatsAPI:
|
||||
assert "marketplace" in data[0]
|
||||
assert "total_products" in data[0]
|
||||
|
||||
def test_stats_require_auth(self, client):
|
||||
def test_get_stats_without_auth(self, client):
|
||||
"""Test that stats endpoints require authentication"""
|
||||
response = client.get("/api/v1/stats")
|
||||
assert response.status_code == 403
|
||||
assert response.status_code == 401 # No authorization header
|
||||
|
||||
Reference in New Issue
Block a user