fix valid date

This commit is contained in:
0Pranav 2019-11-25 14:14:51 +05:30
parent a9ff7df2e6
commit e0c9f3c282

View File

@ -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")