From b88d5d135ef2f8882b135551a59214c9199a6e35 Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Thu, 30 Dec 2021 13:05:54 -0500 Subject: [PATCH] fix(test): validate exception without website item --- erpnext/selling/doctype/quotation/test_quotation.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index 54ff4336f12..33d2a813730 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -129,20 +129,18 @@ class TestQuotation(FrappeTestCase): quotation.insert() quotation.submit() self.assertRaises(frappe.ValidationError, make_sales_order, quotation.name) - + def test_shopping_cart_without_website_item(self): from erpnext.selling.doctype.quotation.quotation import make_sales_order if frappe.db.exists('Website Item', {'item_code': '_Test Item Home Desktop 100'}): frappe.get_last_doc('Website Item', {'item_code': '_Test Item Home Desktop 100'}).delete() - + quotation = frappe.copy_doc(test_records[0]) quotation.order_type = 'Shopping Cart' quotation.valid_till = getdate() - quotation.insert() - quotation.submit() - self.assertRaises(frappe.ValidationError, make_sales_order, quotation.name) - + self.assertRaises(frappe.ValidationError, quotation.validate) + def test_create_quotation_with_margin(self): from erpnext.selling.doctype.quotation.quotation import make_sales_order from erpnext.selling.doctype.sales_order.sales_order import (