def test_get_last_versions(create_buildhub_data, get_result): data = buildhub.get_raw() data, _, _ = buildhub.extract(data) buildhub.get_last_versions(data) x = get_result('tests/data/buildhub/last_versions.json', data) assert x == data
def test_add_unicity(create_buildhub_data, get_result): data = buildhub.get_raw() data, buildids, buildids_per_prod = buildhub.extract(data) buildhub.add_unicity_info(data, buildids, buildids_per_prod) x = get_result('tests/data/buildhub/unicity.json', data) assert x == data
def test_extract(create_buildhub_data, get_result): data = buildhub.get_raw() data, buildids, buildids_per_prod = buildhub.extract(data) data = { 'data': data, 'buildids': buildids, 'buildids_per_prod': buildids_per_prod } x = get_result('tests/data/buildhub/extract.json', data) assert x['data'] == data['data'] assert x['buildids'] == data['buildids'] assert x['buildids_per_prod'] == data['buildids_per_prod']