fix(tests)

This commit is contained in:
Rushabh Mehta 2019-09-24 21:45:48 +05:30
parent 3e4e6d4b3f
commit 0035772f8f
3 changed files with 9 additions and 9 deletions

View file

@ -50,7 +50,7 @@ def get_diff(old, new, for_child=False):
if df.fieldtype in no_value_fields and df.fieldtype not in table_fields:
continue
old_value, new_value = old.get(df.fieldname) or [], new.get(df.fieldname) or []
old_value, new_value = old.get(df.fieldname), new.get(df.fieldname)
if df.fieldtype in table_fields:
# make maps

View file

@ -122,10 +122,10 @@ CREATE TABLE "tabDocType Action" (
"parentfield" varchar(255) DEFAULT NULL,
"parenttype" varchar(255) DEFAULT NULL,
"idx" bigint NOT NULL DEFAULT 0,
"label" varchar(140) DEFAULT NOT NULL,
"label" varchar(140) NOT NULL,
"group" varchar(140) DEFAULT NULL,
"action_type" varchar(140) DEFAULT NOT NULL,
"action" varchar(140) DEFAULT NOT NULL,
"action_type" varchar(140) NOT NULL,
"action" varchar(140) NOT NULL,
PRIMARY KEY ("name")
) ;
@ -147,10 +147,10 @@ CREATE TABLE "tabDocType Link" (
"parentfield" varchar(255) DEFAULT NULL,
"parenttype" varchar(255) DEFAULT NULL,
"idx" bigint NOT NULL DEFAULT 0,
"label" varchar(140) DEFAULT NOT NULL,
"label" varchar(140) NOT NULL,
"group" varchar(140) DEFAULT NULL,
"link_doctype" varchar(140) DEFAULT NOT NULL,
"link_fieldname" varchar(140) DEFAULT NOT NULL,
"link_doctype" varchar(140) NOT NULL,
"link_fieldname" varchar(140) NOT NULL,
PRIMARY KEY ("name")
) ;

View file

@ -136,7 +136,7 @@ class TestNotification(unittest.TestCase):
"reference_name": event.name, "status": "Not Sent"}))
frappe.set_user('Administrator')
frappe.utils.scheduler.trigger(frappe.local.site, "daily", now=True)
frappe.get_doc('Scheduled Job Type', dict(method='frappe.email.doctype.notification.notification.trigger_daily_alerts')).execute()
# not today, so no alert
self.assertFalse(frappe.db.get_value("Email Queue", {"reference_doctype": "Event",
@ -150,7 +150,7 @@ class TestNotification(unittest.TestCase):
self.assertFalse(frappe.db.get_value("Email Queue", {"reference_doctype": "Event",
"reference_name": event.name, "status": "Not Sent"}))
frappe.utils.scheduler.trigger(frappe.local.site, "daily", now=True)
frappe.get_doc('Scheduled Job Type', dict(method='frappe.email.doctype.notification.notification.trigger_daily_alerts')).execute()
# today so show alert
self.assertTrue(frappe.db.get_value("Email Queue", {"reference_doctype": "Event",