def test_move(self, mock_move): source = '/source/path' dest = '/dest/path' shell.move(source, dest) mock_move.assert_called_with(source, dest)
def test_move_echos_fake_mv_command(self, mock_stdout): source = '/source/path' dest = '/dest/path' shell.move(source, dest, echo=True) self.assertEqual(mock_stdout.getvalue(), '>>> mv {} {}\n'.format(source, dest))
def test_move_converts_pathlib_paths(self, mock_convert): source = Path('/source/path') dest = Path('/dest/path') shell.move(source, dest) mock_convert.assert_has_calls([ mock.call(source), mock.call(dest), ])