test: use _dict in tests
form_dict is usually _dict, otherwise some unrelated tests will fail.
This commit is contained in:
parent
b1f6152f38
commit
465b3f6968
1 changed files with 10 additions and 8 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue