fix valid date
diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py
index aab5fd7..7739e3e 100644
--- a/erpnext/selling/doctype/quotation/test_quotation.py
+++ b/erpnext/selling/doctype/quotation/test_quotation.py
@@ -219,11 +219,8 @@
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")