test: use _dict in tests

form_dict is usually _dict, otherwise some unrelated tests will fail.
This commit is contained in:
Ankush Menat 2022-11-29 11:53:52 +05:30
parent b1f6152f38
commit 465b3f6968

View file

@ -89,14 +89,16 @@ class TestQueryReport(FrappeTestCase):
for delimiter in (",", ";", "\t", "|"):
for quoting in (QUOTE_ALL, QUOTE_MINIMAL, QUOTE_NONE, QUOTE_NONNUMERIC):
frappe.local.form_dict = {
"report_name": REPORT_NAME,
"file_format_type": "CSV",
"csv_quoting": quoting,
"csv_delimiter": delimiter,
"include_indentation": 0,
"visible_idx": [0, 1, 2],
}
frappe.local.form_dict = frappe._dict(
{
"report_name": REPORT_NAME,
"file_format_type": "CSV",
"csv_quoting": quoting,
"csv_delimiter": delimiter,
"include_indentation": 0,
"visible_idx": [0, 1, 2],
}
)
export_query()
self.assertTrue(frappe.response["filename"].endswith(".csv"))