def test_create_meta_data_scrapes_text_from_html_description(): with open(os.path.join(RESOURCES, 'image_data_html_description.json')) as f: image_data = json.load(f) expect_description = 'Identificatie Titel(s): Allegorie op kunstenaar Francesco Mazzoli, bekend als Parmigianino' actual_description = wmc._create_meta_data_dict(image_data)['description'] assert actual_description == expect_description
def test_create_meta_data_tallies_zero_global_usage_count(): with open( os.path.join(RESOURCES, 'continuation', 'page_44672185_right.json')) as f: image_data = json.load(f) actual_gu = wmc._create_meta_data_dict(image_data)['global_usage_count'] expect_gu = 0 assert actual_gu == expect_gu