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:
@@ -59,7 +59,9 @@ class TestAdminAPI:
|
||||
assert response.status_code == 400 # Business logic error
|
||||
data = response.json()
|
||||
assert data["error_code"] == "CANNOT_MODIFY_SELF"
|
||||
assert "Cannot perform 'deactivate account' on your own account" in data["message"]
|
||||
assert (
|
||||
"Cannot perform 'deactivate account' on your own account" in data["message"]
|
||||
)
|
||||
|
||||
def test_toggle_user_status_cannot_modify_admin(
|
||||
self, client, admin_headers, test_admin, another_admin
|
||||
@@ -85,7 +87,9 @@ class TestAdminAPI:
|
||||
|
||||
# Check that test_vendor is in the response
|
||||
vendor_codes = [
|
||||
vendor ["vendor_code"] for vendor in data["vendors"] if "vendor_code" in vendor
|
||||
vendor["vendor_code"]
|
||||
for vendor in data["vendors"]
|
||||
if "vendor_code" in vendor
|
||||
]
|
||||
assert test_vendor.vendor_code in vendor_codes
|
||||
|
||||
@@ -98,7 +102,7 @@ class TestAdminAPI:
|
||||
assert data["error_code"] == "ADMIN_REQUIRED"
|
||||
|
||||
def test_verify_vendor_admin(self, client, admin_headers, test_vendor):
|
||||
"""Test admin verifying/unverifying vendor """
|
||||
"""Test admin verifying/unverifying vendor"""
|
||||
response = client.put(
|
||||
f"/api/v1/admin/vendors/{test_vendor.id}/verify", headers=admin_headers
|
||||
)
|
||||
@@ -109,8 +113,10 @@ class TestAdminAPI:
|
||||
assert test_vendor.vendor_code in message
|
||||
|
||||
def test_verify_vendor_not_found(self, client, admin_headers):
|
||||
"""Test admin verifying non-existent vendor """
|
||||
response = client.put("/api/v1/admin/vendors/99999/verify", headers=admin_headers)
|
||||
"""Test admin verifying non-existent vendor"""
|
||||
response = client.put(
|
||||
"/api/v1/admin/vendors/99999/verify", headers=admin_headers
|
||||
)
|
||||
|
||||
assert response.status_code == 404
|
||||
data = response.json()
|
||||
@@ -129,8 +135,10 @@ class TestAdminAPI:
|
||||
assert test_vendor.vendor_code in message
|
||||
|
||||
def test_toggle_vendor_status_not_found(self, client, admin_headers):
|
||||
"""Test admin toggling status for non-existent vendor """
|
||||
response = client.put("/api/v1/admin/vendors/99999/status", headers=admin_headers)
|
||||
"""Test admin toggling status for non-existent vendor"""
|
||||
response = client.put(
|
||||
"/api/v1/admin/vendors/99999/status", headers=admin_headers
|
||||
)
|
||||
|
||||
assert response.status_code == 404
|
||||
data = response.json()
|
||||
@@ -166,7 +174,8 @@ class TestAdminAPI:
|
||||
data = response.json()
|
||||
assert len(data) >= 1
|
||||
assert all(
|
||||
job["marketplace"] == test_marketplace_import_job.marketplace for job in data
|
||||
job["marketplace"] == test_marketplace_import_job.marketplace
|
||||
for job in data
|
||||
)
|
||||
|
||||
def test_get_marketplace_import_jobs_non_admin(self, client, auth_headers):
|
||||
|
||||
Reference in New Issue
Block a user