def get_build(self, job_name: str, build_count: int): data = self.jenkins.get_build_info(job_name, build_count) return parse_build(data)
def test_parses_status(build_data): build = parse_build(build_data) assert build.status == 'FAILURE'
def test_parses_failed_tests(build_data): build = parse_build(build_data) assert build.failed_tests == 3
def test_parses_duration(build_data): build = parse_build(build_data) assert build.duration == 676304
def test_parses_timestamp(build_data): build = parse_build(build_data) assert build.timestamp == 1587131889595 / 1000
def test_parses_number(build_data): build = parse_build(build_data) assert build.number == 1
def test_parses_name(build_data): build = parse_build(build_data) assert build.job_name == 'PR-1377'
def test_parses_revision(build_data): build = parse_build(build_data) assert build.revision == 'ad916fe96f7e13a1d192ca5a7595ede65399063f'