Merge pull request #17204 from rohitwaghchaure/fix_test_cases_for_item_variant_develop

fix: item variant test cases(cherry-pick)
This commit is contained in:
rohitwaghchaure 2019-04-11 10:56:06 +05:30 committed by GitHub
commit a6f54aa437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"}
]
},
{