Ejemplo n.º 1
0
 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 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 def do(self):
     symlink_if_src_exists(self._from, self._to, self._overwrite)