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:
2
tests/fixtures/auth_fixtures.py
vendored
2
tests/fixtures/auth_fixtures.py
vendored
@@ -53,6 +53,7 @@ def test_admin(db, auth_manager):
|
||||
db.expunge(admin)
|
||||
return admin
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def another_admin(db, auth_manager):
|
||||
"""Create another test admin user for testing admin-to-admin interactions"""
|
||||
@@ -72,6 +73,7 @@ def another_admin(db, auth_manager):
|
||||
db.expunge(admin)
|
||||
return admin
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def other_user(db, auth_manager):
|
||||
"""Create a different user for testing access controls"""
|
||||
|
||||
1
tests/fixtures/customer_fixtures.py
vendored
1
tests/fixtures/customer_fixtures.py
vendored
@@ -1,5 +1,6 @@
|
||||
# tests/fixtures/customer_fixtures.py
|
||||
import pytest
|
||||
|
||||
from models.database.customer import Customer, CustomerAddress
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# tests/fixtures/marketplace_import_job_fixtures.py
|
||||
import pytest
|
||||
|
||||
from models.database.marketplace_import_job import MarketplaceImportJob
|
||||
|
||||
|
||||
|
||||
@@ -117,7 +117,9 @@ def marketplace_product_factory():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def test_marketplace_product_with_inventory(db, test_marketplace_product, test_inventory):
|
||||
def test_marketplace_product_with_inventory(
|
||||
db, test_marketplace_product, test_inventory
|
||||
):
|
||||
"""MarketplaceProduct with associated inventory record."""
|
||||
# Ensure they're linked by GTIN
|
||||
if test_marketplace_product.gtin != test_inventory.gtin:
|
||||
@@ -126,6 +128,6 @@ def test_marketplace_product_with_inventory(db, test_marketplace_product, test_i
|
||||
db.refresh(test_inventory)
|
||||
|
||||
return {
|
||||
'marketplace_product': test_marketplace_product,
|
||||
'inventory': test_inventory
|
||||
"marketplace_product": test_marketplace_product,
|
||||
"inventory": test_inventory,
|
||||
}
|
||||
|
||||
5
tests/fixtures/testing_fixtures.py
vendored
5
tests/fixtures/testing_fixtures.py
vendored
@@ -8,8 +8,9 @@ This module provides fixtures for:
|
||||
- Additional testing utilities
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
|
||||
|
||||
@@ -26,7 +27,7 @@ def empty_db(db):
|
||||
"inventory", # Fixed: singular not plural
|
||||
"products", # Referenced by products
|
||||
"vendors", # Has foreign key to users
|
||||
"users" # Base table
|
||||
"users", # Base table
|
||||
]
|
||||
|
||||
for table in tables_to_clear:
|
||||
|
||||
6
tests/fixtures/vendor_fixtures.py
vendored
6
tests/fixtures/vendor_fixtures.py
vendored
@@ -1,10 +1,11 @@
|
||||
# tests/fixtures/vendor_fixtures.py
|
||||
import uuid
|
||||
|
||||
import pytest
|
||||
|
||||
from models.database.vendor import Vendor
|
||||
from models.database.product import Product
|
||||
from models.database.inventory import Inventory
|
||||
from models.database.product import Product
|
||||
from models.database.vendor import Vendor
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -185,6 +186,7 @@ def multiple_inventory_entries(db, multiple_products, test_vendor):
|
||||
|
||||
def create_unique_vendor_factory():
|
||||
"""Factory function to create unique vendors in tests"""
|
||||
|
||||
def _create_vendor(db, owner_user_id, **kwargs):
|
||||
unique_id = str(uuid.uuid4())[:8]
|
||||
defaults = {
|
||||
|
||||
Reference in New Issue
Block a user