correcting dict passed to facade #41
GitHub Actions / Test Results
failed
Oct 12, 2023 in 0s
1 fail in 1m 24s
Annotations
Check warning on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_pipelines (tests.test_main.TestHAPIPipelines) failed
test-results.xml [took 1m 22s]
Raw output
assert 1 == 17
self = <test_main.TestHAPIPipelines object at 0x7effbbd1a050>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... 'org_acronym', 'org_type_name', 'sector'], 'output_hxl': ['#org+name', '#org+acronym', '#org+type+name', '#sector']}}}
folder = 'tests/fixtures'
def test_pipelines(self, configuration, folder):
with ErrorsOnExit() as errors_on_exit:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
dbpath = join(temp_folder, "test_hapi.db")
try:
remove(dbpath)
except OSError:
pass
logger.info(f"Creating database {dbpath}")
with Database(database=dbpath, dialect="sqlite") as session:
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
errors_on_exit=errors_on_exit,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
count = session.scalar(select(func.count(DBLocation.id)))
assert count == 3
count = session.scalar(select(func.count(DBAdmin1.id)))
assert count == 84
count = session.scalar(select(func.count(DBAdmin2.id)))
assert count == 1312
count = session.scalar(select(func.count(DBDataset.id)))
assert count == 6
count = session.scalar(select(func.count(DBResource.id)))
assert count == 11
count = session.scalar(select(func.count(DBOrgType.code)))
assert count == 14
count = session.scalar(select(func.count(DBSector.code)))
assert count == 15
count = session.scalar(select(func.count(DBGender.code)))
assert count == 3
count = session.scalar(select(func.count(DBAgeRange.code)))
> assert count == 17
E assert 1 == 17
tests/test_main.py:107: AssertionError
Loading