def it_uses_validate_path(tmpdir): patcher = patch('readthedocs.config.validation.validate_path') with patcher as validate_path: path = text_type(tmpdir.mkdir('a directory')) validate_path.return_value = path validate_directory(path, str(tmpdir)) validate_path.assert_called_with(path, str(tmpdir))
def it_uses_validate_path(tmpdir): patcher = patch('readthedocs.config.validation.validate_path') with patcher as validate_path: path = tmpdir.join('a file') path.write('content') path = str(path) validate_path.return_value = path validate_file(path, str(tmpdir)) validate_path.assert_called_with(path, str(tmpdir))