def _check_move_file(self, src, dst, real_dst): """Check that a file was indeed moved.""" with open_file(src, "rb") as f: contents = f.read() recursive_move(src, dst) with open_file(real_dst, "rb") as f: self.assertEqual(contents, f.read()) self.assertFalse(path_exists(src))
def _check_move_dir(self, src, dst, real_dst): """Check that a dir was indeed moved.""" contents = sorted(listdir(src)) recursive_move(src, dst) self.assertEqual(contents, sorted(listdir(real_dst))) self.assertFalse(path_exists(src))