Application fully migrated to modular approach
This commit is contained in:
@@ -17,7 +17,7 @@ class TestShopsAPI:
|
||||
data = response.json()
|
||||
assert data["shop_code"] == "NEWSHOP"
|
||||
assert data["shop_name"] == "New Shop"
|
||||
assert data["is_active"] == True
|
||||
assert data["is_active"] is True
|
||||
|
||||
def test_create_shop_duplicate_code(self, client, auth_headers, test_shop):
|
||||
"""Test creating shop with duplicate code"""
|
||||
@@ -49,7 +49,7 @@ class TestShopsAPI:
|
||||
assert data["shop_code"] == test_shop.shop_code
|
||||
assert data["shop_name"] == test_shop.shop_name
|
||||
|
||||
def test_shops_require_auth(self, client):
|
||||
def test_get_shop_without_auth(self, client):
|
||||
"""Test that shop endpoints require authentication"""
|
||||
response = client.get("/api/v1/shop")
|
||||
assert response.status_code == 403
|
||||
assert response.status_code == 401 # No authorization header
|
||||
|
||||
Reference in New Issue
Block a user