style: apply black and isort formatting across entire codebase
- Standardize quote style (single to double quotes) - Reorder and group imports alphabetically - Fix line breaks and indentation for consistency - Apply PEP 8 formatting standards Also updated Makefile to exclude both venv and .venv from code quality checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -23,8 +23,7 @@ class TestVendorDashboardAPI:
|
||||
):
|
||||
"""Test dashboard stats returns correct data structure"""
|
||||
response = client.get(
|
||||
"/api/v1/vendor/dashboard/stats",
|
||||
headers=vendor_user_headers
|
||||
"/api/v1/vendor/dashboard/stats", headers=vendor_user_headers
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
@@ -66,9 +65,9 @@ class TestVendorDashboardAPI:
|
||||
self, client, db, test_vendor_user, auth_manager
|
||||
):
|
||||
"""Test that dashboard stats only show data for the authenticated vendor"""
|
||||
from models.database.vendor import Vendor, VendorUser
|
||||
from models.database.product import Product
|
||||
from models.database.marketplace_product import MarketplaceProduct
|
||||
from models.database.product import Product
|
||||
from models.database.vendor import Vendor, VendorUser
|
||||
|
||||
# Create two separate vendors with different data
|
||||
vendor1 = Vendor(
|
||||
@@ -118,10 +117,7 @@ class TestVendorDashboardAPI:
|
||||
vendor1_headers = {"Authorization": f"Bearer {token_data['access_token']}"}
|
||||
|
||||
# Get stats for vendor1
|
||||
response = client.get(
|
||||
"/api/v1/vendor/dashboard/stats",
|
||||
headers=vendor1_headers
|
||||
)
|
||||
response = client.get("/api/v1/vendor/dashboard/stats", headers=vendor1_headers)
|
||||
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
@@ -130,9 +126,7 @@ class TestVendorDashboardAPI:
|
||||
assert data["vendor"]["id"] == vendor1.id
|
||||
assert data["products"]["total"] == 3
|
||||
|
||||
def test_dashboard_stats_without_vendor_association(
|
||||
self, client, db, auth_manager
|
||||
):
|
||||
def test_dashboard_stats_without_vendor_association(self, client, db, auth_manager):
|
||||
"""Test dashboard stats for user not associated with any vendor"""
|
||||
from models.database.user import User
|
||||
|
||||
@@ -206,8 +200,7 @@ class TestVendorDashboardAPI:
|
||||
):
|
||||
"""Test dashboard stats for vendor with no data"""
|
||||
response = client.get(
|
||||
"/api/v1/vendor/dashboard/stats",
|
||||
headers=vendor_user_headers
|
||||
"/api/v1/vendor/dashboard/stats", headers=vendor_user_headers
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
@@ -224,8 +217,8 @@ class TestVendorDashboardAPI:
|
||||
self, client, db, vendor_user_headers, test_vendor_with_vendor_user
|
||||
):
|
||||
"""Test dashboard stats accuracy with actual products"""
|
||||
from models.database.product import Product
|
||||
from models.database.marketplace_product import MarketplaceProduct
|
||||
from models.database.product import Product
|
||||
|
||||
# Create marketplace products
|
||||
mp = MarketplaceProduct(
|
||||
@@ -249,8 +242,7 @@ class TestVendorDashboardAPI:
|
||||
|
||||
# Get stats
|
||||
response = client.get(
|
||||
"/api/v1/vendor/dashboard/stats",
|
||||
headers=vendor_user_headers
|
||||
"/api/v1/vendor/dashboard/stats", headers=vendor_user_headers
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
@@ -267,8 +259,7 @@ class TestVendorDashboardAPI:
|
||||
|
||||
start_time = time.time()
|
||||
response = client.get(
|
||||
"/api/v1/vendor/dashboard/stats",
|
||||
headers=vendor_user_headers
|
||||
"/api/v1/vendor/dashboard/stats", headers=vendor_user_headers
|
||||
)
|
||||
end_time = time.time()
|
||||
|
||||
@@ -284,8 +275,7 @@ class TestVendorDashboardAPI:
|
||||
responses = []
|
||||
for _ in range(3):
|
||||
response = client.get(
|
||||
"/api/v1/vendor/dashboard/stats",
|
||||
headers=vendor_user_headers
|
||||
"/api/v1/vendor/dashboard/stats", headers=vendor_user_headers
|
||||
)
|
||||
responses.append(response)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user