Added notification clearing hook, fixed db query test cases

This commit is contained in:
Anand Doshi 2014-03-05 15:23:22 +05:30
parent d8fa3d8075
commit 291cd2777f
2 changed files with 7 additions and 3 deletions

View file

@ -43,4 +43,8 @@ has_permission:ToDo = frappe.core.doctype.todo.todo.has_permission
# bean
bean_event:User Vote:after_insert = frappe.templates.generators.website_group.clear_cache_on_bean_event
bean_event:Website Route Permission:on_update = frappe.templates.generators.website_group.clear_cache_on_bean_event
bean_event:Website Route Permission:on_update = frappe.templates.generators.website_group.clear_cache_on_bean_event
bean_event:*:on_update = frappe.core.doctype.notification_count.notification_count.clear_doctype_notifications
bean_event:*:on_cancel = frappe.core.doctype.notification_count.notification_count.clear_doctype_notifications
bean_event:*:on_trash = frappe.core.doctype.notification_count.notification_count.clear_doctype_notifications

View file

@ -7,11 +7,11 @@ from frappe.model.db_query import DatabaseQuery
class TestReportview(unittest.TestCase):
def test_basic(self):
self.assertTrue({"name":"DocType"} in DatabaseQuery("DocType").execute())
self.assertTrue({"name":"DocType"} in DatabaseQuery("DocType").execute(limit_page_length=None))
def test_fields(self):
self.assertTrue({"name":"DocType", "issingle":0} \
in DatabaseQuery("DocType").execute(fields=["name", "issingle"]))
in DatabaseQuery("DocType").execute(fields=["name", "issingle"], limit_page_length=None))
def test_filters_1(self):
self.assertFalse({"name":"DocType"} \