From e0c9f3c282d535b726cdf21d3a04ec1e6fd22a33 Mon Sep 17 00:00:00 2001 From: 0Pranav Date: Mon, 25 Nov 2019 14:14:51 +0530 Subject: [PATCH] fix valid date --- erpnext/selling/doctype/quotation/test_quotation.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index aab5fd783a..7739e3e623 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -219,11 +219,8 @@ class TestQuotation(unittest.TestCase): yesterday = getdate(nowdate()) - datetime.timedelta(days=1) expired_quotation = make_quotation(item_list=quotation_item) # Manually set valid till date to bypass validation - frappe.db.sql(""" - UPDATE tabQuotation - SET valid_till = %s - WHERE name = %s - """,(yesterday,expired_quotation.name)) + expired_quotation.valid_till = yesterday + expired_quotation.save() set_expired_status() self.assertEqual(expired_quotation.status,"Expired")