def generate_reports_hungary(*, workers, kernel_name, wwwroot, force, disable_pbar, debug): _ = oscovida.fetch_data_hungary() # TODO: The get_x_list methods should be part of Reporter class counties = oscovida.get_counties_hungary() hre = ReportExecutor( Reporter=HungaryReport, kernel_name=kernel_name, wwwroot=wwwroot, expiry_hours=2, attempts=3, workers=workers, force=force, disable_pbar=disable_pbar, debug=debug, ) if debug: counties = counties[:10] hre.create_html_reports(counties) hre.create_markdown_index_page()
def hungary_check_region_name_is_known(region): counties = oscovida.get_counties_hungary() assert region in counties, f"{region} is unknown. Known regions are {counties}"
def test_get_Hungary_region_list(): x = c.get_counties_hungary() assert x[0] == "Bács-Kiskun" assert "Budapest" in x assert len(x) == 20 # 19 county and the capital city