fix(tests)
This commit is contained in:
parent
7406ee31f2
commit
0496e5cd28
3 changed files with 8 additions and 8 deletions
|
|
@ -3,7 +3,7 @@
|
|||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
#import frappe
|
||||
import unittest
|
||||
|
||||
class TestMilestone(unittest.TestCase):
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import unittest
|
|||
class TestMilestoneTracker(unittest.TestCase):
|
||||
def test_milestone(self):
|
||||
frappe.db.sql('delete from `tabMilestone Tracker`')
|
||||
tracker = frappe.get_doc(dict(
|
||||
frappe.get_doc(dict(
|
||||
doctype = 'Milestone Tracker',
|
||||
document_type = 'ToDo',
|
||||
track_field = 'status'
|
||||
|
|
|
|||
|
|
@ -117,6 +117,12 @@ class Document(BaseDocument):
|
|||
# incorrect arguments. let's not proceed.
|
||||
raise ValueError('Illegal arguments')
|
||||
|
||||
@staticmethod
|
||||
def whitelist(f):
|
||||
"""Decorator: Whitelist method to be called remotely via REST API."""
|
||||
f.whitelisted = True
|
||||
return f
|
||||
|
||||
def reload(self):
|
||||
"""Reload document from database"""
|
||||
self.load_from_db()
|
||||
|
|
@ -1008,12 +1014,6 @@ class Document(BaseDocument):
|
|||
if not frappe.flags.in_migrate:
|
||||
follow_document(self.doctype, self.name, frappe.session.user)
|
||||
|
||||
@staticmethod
|
||||
def whitelist(f):
|
||||
"""Decorator: Whitelist method to be called remotely via REST API."""
|
||||
f.whitelisted = True
|
||||
return f
|
||||
|
||||
@staticmethod
|
||||
def hook(f):
|
||||
"""Decorator: Make method `hookable` (i.e. extensible by another app).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue