Beispiel #1
0
 def test_unlock_locked_by_itself(self):
     node = DirectoryNode("path_part", "parent")
     child = FakeDirectoryNode()
     node.children["child"] = child
     node.lock()
     node.unlock()
     assert child.unlocker is node
Beispiel #2
0
 def test_unlock_locked_by_another_node(self):
     node = DirectoryNode("path_part", "parent")
     child = FakeDirectoryNode()
     node.children["child"] = child
     node.lock("lock_owner")
     node.unlock()
     assert child.unlocker is None