def add_log(case_run_id, name, url): """ .. function:: XML-RPC TestCaseRun.add_log(case_run_id, name, url) Add new log link to a TestCaseRun :param case_run_id: PK of a TestCaseRun object :type case_run_id: int :param name: Name/description of the log :type name: str :param url: URL of the log :type url: str :return: ID of created log link :rtype: int :raises: RuntimeError if operation not successfull """ result = create_link({ 'name': name, 'url': url, 'target': 'TestCaseRun', 'target_id': case_run_id }) if result['rc'] != 0: raise RuntimeError(result['response']) return result['data']['pk']
def attach_log(case_run_id, name, url): """ .. function:: XML-RPC TestCaseRun.attach_log Add new log link to a TestCaseRun :param case_run_id: PK of a TestCaseRun object :type case_run_id: int :param name: Name/description of the log :type name: str :param url: URL of the log :type url: str :return: Nothing """ result = create_link({ 'name': name, 'url': url, 'target': 'TestCaseRun', 'target_id': case_run_id }) if result['rc'] != 0: raise RuntimeError(result['response'])