The license.txt file has been replaced with LICENSE for quite a while now. INAL but it didn't seem accurate to say "hey, checkout license.txt although there's no such file". Apart from this, there were inconsistencies in the headers altogether...this change brings consistency.
16 lines
497 B
Python
16 lines
497 B
Python
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
|
# License: MIT. See LICENSE
|
|
import frappe, unittest
|
|
|
|
class TestDocumentLocks(unittest.TestCase):
|
|
def test_locking(self):
|
|
todo = frappe.get_doc(dict(doctype='ToDo', description='test')).insert()
|
|
todo_1 = frappe.get_doc('ToDo', todo.name)
|
|
|
|
todo.lock()
|
|
self.assertRaises(frappe.DocumentLockedError, todo_1.lock)
|
|
todo.unlock()
|
|
|
|
todo_1.lock()
|
|
self.assertRaises(frappe.DocumentLockedError, todo.lock)
|
|
todo_1.unlock()
|