fix: item variant test cases

This commit is contained in:
Rohit Waghchaure 2019-04-10 17:55:59 +05:30
parent 5f2238e98f
commit 9665a531fc
2 changed files with 6 additions and 5 deletions

View File

@ -42,10 +42,10 @@ def create_variant_with_tables(item, args):
return variant
def make_item_variant():
frappe.delete_doc_if_exists("Item", "_Test Variant Item-S", force=1)
variant = create_variant_with_tables("_Test Variant Item", '{"Test Size": "Small"}')
variant.item_code = "_Test Variant Item-S"
variant.item_name = "_Test Variant Item-S"
frappe.delete_doc_if_exists("Item", "_Test Variant Item-XSL", force=1)
variant = create_variant_with_tables("_Test Variant Item", '{"Test Size": "Extra Small"}')
variant.item_code = "_Test Variant Item-XSL"
variant.item_name = "_Test Variant Item-XSL"
variant.save()
return variant

View File

@ -6,7 +6,8 @@
"item_attribute_values": [
{"attribute_value": "Small", "abbr": "S"},
{"attribute_value": "Medium", "abbr": "M"},
{"attribute_value": "Large", "abbr": "L"}
{"attribute_value": "Large", "abbr": "L"},
{"attribute_value": "Extra Small", "abbr": "XSL"}
]
},
{