backend changes on test files of catalog
This commit is contained in:
47
data/seed_catalogs/brand_catalog_bikaji.json
Normal file
47
data/seed_catalogs/brand_catalog_bikaji.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"brand": "bikaji",
|
||||
"search_query": "Bikaji products catalog",
|
||||
"generation_timestamp": "C:\\Brand_Catalog_LLM\\RAG_Model_Nutrition_Intelligence\\RAG_Model_Full_Implement\\backend\\app\\services\\brand_sync.py",
|
||||
"total_products": 1,
|
||||
"total_images": 10,
|
||||
"products": [
|
||||
{
|
||||
"brand": "Bikaji",
|
||||
"brand_name": "Bikaji",
|
||||
"product_name": "Bikaji Aloo Bhujia 200g",
|
||||
"title": "Bikaji Aloo",
|
||||
"description": "Spiced potato snack",
|
||||
"category": "Namkeen",
|
||||
"image_id": "bikaji_bikaji_aloo_bhujia_200g",
|
||||
"image_url": "https://m.media-amazon.com/images/I/81XXOOc0nlL._SL1500_.jpg",
|
||||
"image_urls": [
|
||||
"https://m.media-amazon.com/images/I/81XXOOc0nlL._SL1500_.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/400/440/0731/front_en.4.400.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/400/440/0779/front_fr.9.400.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/400/440/0694/front_en.4.400.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/400/440/0687/front_en.5.400.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/400/440/0755/front_fr.3.400.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/406/324/0187/front_en.12.400.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/406/324/0057/front_en.16.400.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/406/320/0013/front_en.35.400.jpg",
|
||||
"https://images.openfoodfacts.org/images/products/890/406/323/1574/front_en.3.400.jpg"
|
||||
],
|
||||
"price_range": "₹27-33",
|
||||
"size_variants": [
|
||||
"200g"
|
||||
],
|
||||
"providers": [],
|
||||
"fssai_license": "",
|
||||
"product_sku": "BIKAJI-ALO-200-001",
|
||||
"sku_source": "Internal",
|
||||
"hsn_code": "1905",
|
||||
"final_selling_price": 38.94,
|
||||
"selling_price": 33.0,
|
||||
"barcode": null,
|
||||
"barcode_type": null,
|
||||
"highlights": [],
|
||||
"nutrients": [],
|
||||
"search_query": "Bikaji Bikaji Aloo Bhujia 200g Namkeen Spiced potato snack"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"AACHI-SAM-100": 1
|
||||
"AACHI-SAM-100": 1,
|
||||
"AACHI-SAM-200": 1
|
||||
}
|
||||
}
|
||||
5
data/sku_sequences/Bikaji.json
Normal file
5
data/sku_sequences/Bikaji.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"BIKAJI-ALO-200": 1
|
||||
}
|
||||
}
|
||||
5
data/sku_sequences/Idhayam.json
Normal file
5
data/sku_sequences/Idhayam.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"IDHAYA-SES-500": 1
|
||||
}
|
||||
}
|
||||
5
data/sku_sequences/amul.json
Normal file
5
data/sku_sequences/amul.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"AMUL-BUT-500": 1
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"BRITAN-50-200": 11,
|
||||
"BRITAN-50-100": 4,
|
||||
"BRITAN-50-250": 2,
|
||||
"BRITAN-50-500": 3,
|
||||
"BRITAN-GOO-200": 3
|
||||
"BRITAN-GOO-100": 1,
|
||||
"BRITAN-GOO-200": 1,
|
||||
"BRITAN-GOO-500": 1
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"CADBUR-DAI-100": 1
|
||||
"CADBUR-DAI-150": 1
|
||||
}
|
||||
}
|
||||
5
data/sku_sequences/itc.json
Normal file
5
data/sku_sequences/itc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"ITC-AAS-1": 1
|
||||
}
|
||||
}
|
||||
7
data/sku_sequences/nestle.json
Normal file
7
data/sku_sequences/nestle.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"NESTLE-MUN-20": 1,
|
||||
"NESTLE-MUN-55": 1,
|
||||
"NESTLE-MUN-150": 1
|
||||
}
|
||||
}
|
||||
5
data/sku_sequences/parle.json
Normal file
5
data/sku_sequences/parle.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"_sku_sequences": {
|
||||
"PARLE-G-250": 1
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,19 @@ def _sheet(headers, rows) -> bytes:
|
||||
return buf.getvalue()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _isolate_sku_counter(tmp_path, monkeypatch):
|
||||
"""Keep the SKU sequence counter out of the repo.
|
||||
|
||||
`sku_service` persists its per-brand counter to DATA_DIR/sku_sequences so
|
||||
reruns keep issuing fresh numbers. Left alone, running the suite mutates a
|
||||
real directory in the working tree; pointing it at tmp_path keeps each test
|
||||
session self-contained and makes SKU numbering deterministic per test.
|
||||
"""
|
||||
from app.services import sku_service
|
||||
monkeypatch.setattr(sku_service, "_data_dir", tmp_path / "sku_sequences")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def store(monkeypatch):
|
||||
"""A fake brand table. Returns the dict of image_id -> stored row."""
|
||||
|
||||
Reference in New Issue
Block a user