From 73523c29663ac5f5cb55e86bf88890b023fb57e4 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 3 Jul 2017 13:27:54 +0530 Subject: [PATCH] [tests] frappe.form_dict --- .../authentication_log/test_authentication_log.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frappe/core/doctype/authentication_log/test_authentication_log.py b/frappe/core/doctype/authentication_log/test_authentication_log.py index 58c230184d..3b59cc33da 100644 --- a/frappe/core/doctype/authentication_log/test_authentication_log.py +++ b/frappe/core/doctype/authentication_log/test_authentication_log.py @@ -13,13 +13,13 @@ class TestAuthenticationLog(unittest.TestCase): from frappe.auth import LoginManager, CookieManager # test user login log - frappe.local.form_dict = { 'cmd': 'login' } + frappe.local.form_dict = frappe._dict(cmd='login') - frappe.form_dict = { + frappe.form_dict = frappe._dict({ 'sid': 'Guest', 'pwd': 'admin', 'usr': 'Administrator' - } + }) frappe.local.cookie_manager = CookieManager() frappe.local.login_manager = LoginManager() @@ -39,8 +39,8 @@ class TestAuthenticationLog(unittest.TestCase): self.assertEquals(auth_log.status, 'Failed') def get_auth_log(self, operation='Login'): - names = frappe.db.sql_list("""select name from `tabAuthentication Log` - where user='Administrator' and operation='{operation}' order by + names = frappe.db.sql_list("""select name from `tabAuthentication Log` + where user='Administrator' and operation='{operation}' order by creation desc""".format(operation=operation)) name = names[0]