vendor refactoring
This commit is contained in:
@@ -64,21 +64,21 @@ class TestIntegrationFlows:
|
||||
"""Test vendor creation and product management workflow"""
|
||||
# 1. Create a vendor
|
||||
vendor_data = {
|
||||
"vendor_code": "FLOWSHOP",
|
||||
"vendor_name": "Integration Flow Shop",
|
||||
"vendor_code": "FLOWVENDOR",
|
||||
"vendor_name": "Integration Flow Vendor",
|
||||
"description": "Test vendor for integration",
|
||||
}
|
||||
|
||||
response = client.post("/api/v1/vendor ", headers=auth_headers, json=vendor_data)
|
||||
response = client.post("/api/v1/vendor", headers=auth_headers, json=vendor_data)
|
||||
assert response.status_code == 200
|
||||
vendor = response.json()
|
||||
|
||||
# 2. Create a product
|
||||
product_data = {
|
||||
"marketplace_product_id": "SHOPFLOW001",
|
||||
"marketplace_product_id": "VENDORFLOW001",
|
||||
"title": "Vendor Flow MarketplaceProduct",
|
||||
"price": "15.99",
|
||||
"marketplace": "ShopFlow",
|
||||
"marketplace": "VendorFlow",
|
||||
}
|
||||
|
||||
response = client.post(
|
||||
@@ -91,7 +91,7 @@ class TestIntegrationFlows:
|
||||
# This would test the vendor -product association
|
||||
|
||||
# 4. Get vendor details
|
||||
response = client.get(f"/api/v1/vendor /{vendor ['vendor_code']}", headers=auth_headers)
|
||||
response = client.get(f"/api/v1/vendor/{vendor ['vendor_code']}", headers=auth_headers)
|
||||
assert response.status_code == 200
|
||||
|
||||
def test_stock_operations_workflow(self, client, auth_headers):
|
||||
|
||||
Reference in New Issue
Block a user