예제 #1
0
 def test_get_lock02(self, mock_filelock):
     """With parameters"""
     self.create_general_config()
     host = Host(self.test_root)
     book = Book(host)
     book.get_lock('test',
         timeout=10, stale=120, poll_interval=0.3, assume_acquired=True)
     mock_filelock.assert_called_once_with(host, 'book--test',
         timeout=10, stale=120, poll_interval=0.3, assume_acquired=True)
예제 #2
0
 def test_get_lock01(self, mock_filelock):
     self.create_general_config()
     host = Host(self.test_root)
     book = Book(host)
     book.get_lock('test')
     mock_filelock.assert_called_once_with(host, 'book--test')