Application fully migrated to modular approach
This commit is contained in:
@@ -17,7 +17,7 @@ class TestIntegrationFlows:
|
||||
"marketplace": "TestFlow"
|
||||
}
|
||||
|
||||
response = client.post("/api/v1/products", headers=auth_headers, json=product_data)
|
||||
response = client.post("/api/v1/product", headers=auth_headers, json=product_data)
|
||||
assert response.status_code == 200
|
||||
product = response.json()
|
||||
|
||||
@@ -32,19 +32,19 @@ class TestIntegrationFlows:
|
||||
assert response.status_code == 200
|
||||
|
||||
# 3. Get product with stock info
|
||||
response = client.get(f"/api/v1/products/{product['product_id']}", headers=auth_headers)
|
||||
response = client.get(f"/api/v1/product/{product['product_id']}", headers=auth_headers)
|
||||
assert response.status_code == 200
|
||||
product_detail = response.json()
|
||||
assert product_detail["stock_info"]["total_quantity"] == 50
|
||||
|
||||
# 4. Update product
|
||||
update_data = {"title": "Updated Integration Test Product"}
|
||||
response = client.put(f"/api/v1/products/{product['product_id']}",
|
||||
response = client.put(f"/api/v1/product/{product['product_id']}",
|
||||
headers=auth_headers, json=update_data)
|
||||
assert response.status_code == 200
|
||||
|
||||
# 5. Search for product
|
||||
response = client.get("/api/v1/products?search=Updated Integration", headers=auth_headers)
|
||||
response = client.get("/api/v1/product?search=Updated Integration", headers=auth_headers)
|
||||
assert response.status_code == 200
|
||||
assert response.json()["total"] == 1
|
||||
|
||||
@@ -69,7 +69,7 @@ class TestIntegrationFlows:
|
||||
"marketplace": "ShopFlow"
|
||||
}
|
||||
|
||||
response = client.post("/api/v1/products", headers=auth_headers, json=product_data)
|
||||
response = client.post("/api/v1/product", headers=auth_headers, json=product_data)
|
||||
assert response.status_code == 200
|
||||
product = response.json()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user