test: Do not overwrite frappe.form_dict to retain proxy reference

Set frappe.local.form_dict instead
This commit is contained in:
Suraj Shetty 2022-04-13 19:10:19 +05:30
parent 199419db80
commit cef28df8db
3 changed files with 1 additions and 3 deletions

View File

@ -65,7 +65,6 @@ class TestRequestforQuotation(FrappeTestCase):
)
sq.submit()
frappe.form_dict = frappe.local("form_dict")
frappe.form_dict.name = rfq.name
self.assertEqual(check_supplier_has_docname_access(supplier_wt_appos[0].get("supplier")), True)

View File

@ -19,7 +19,7 @@ class TestQualityProcedure(unittest.TestCase):
)
).insert()
frappe.form_dict = frappe._dict(
frappe.local.form_dict = frappe._dict(
doctype="Quality Procedure",
quality_procedure_name="Test Child 1",
parent_quality_procedure=procedure.name,

View File

@ -8,7 +8,6 @@ from erpnext.hr.doctype.employee.test_employee import make_employee
class TestExotel(FrappeAPITestCase):
@classmethod
def setUpClass(cls):
frappe.form_dict = frappe._dict()
cls.CURRENT_DB_CONNECTION = frappe.db
cls.test_employee_name = make_employee(
user="test_employee_exotel@company.com", cell_number="9999999999"