def test_symlink_if_src_exists_ok(self, symlink_mock, _): from_path = '/tmp/from/path' to_path = '/tmp/to/path' utils.symlink_if_src_exists(from_path, to_path) symlink_mock.assert_called_once_with(from_path, to_path, overwrite=True)
def test_symlink_if_src_exists_not_exists(self, symlink_mock, _): from_path = '/tmp/from/path' to_path = '/tmp/to/path' utils.symlink_if_src_exists(from_path, to_path) self.method_was_not_called(symlink_mock)
def do(self): symlink_if_src_exists(self._from, self._to, self._overwrite)