Exemple #1
0
 def test_symlink_failure(self, m_symlink, m_log):
     m_symlink.side_effect = IOError
     worker.symlink_worker_log("path/to/worker.log", "path/to/archive")
     # actually logs the exception
     assert m_log.exception.called
Exemple #2
0
 def test_symlink_success(self, m_symlink):
     worker.symlink_worker_log("path/to/worker.log", "path/to/archive")
     m_symlink.assert_called_with("path/to/worker.log",
                                  "path/to/archive/worker.log")