Change mappings #52
GitHub Actions / Test Results
failed
Oct 4, 2024 in 0s
1 fail, 1 pass in 2m 21s
Annotations
Check warning on line 0 in tests.test_get_org_stats.TestGetOrgStats
github-actions / Test Results
test_get_org_stats (tests.test_get_org_stats.TestGetOrgStats) failed
junit/test-results.xml [took 1m 3s]
Raw output
AssertionError:
- usaca,US Army Civil Affairs (inactive),USACA,0bf37f0c-204c-4ecd-9e16-06fd581ffaa5,Military,Global,USA,45.73643438,-112.404207,0,0,0,23,37,0,0,0,1,0,,0,,0,,0,,0,,87,No,No,No,No,1,0,0,0,2018-11-29,,No,Yes,0,0,0,0,0,geodata,N
? ^^^^ ---
+ usaca,US Army Civil Affairs (inactive),USACA,0bf37f0c-204c-4ecd-9e16-06fd581ffaa5,Government,Global,USA,45.73643438,-112.404207,0,0,0,23,37,0,0,0,1,0,,0,,0,,0,,0,,87,No,No,No,No,1,0,0,0,2018-11-29,,No,Yes,0,0,0,0,0,geodata,N
? ^^^^^^^^^
self = <tests.test_get_org_stats.TestGetOrgStats object at 0x7feeb537bd40>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu....Red Cross and Red Crescent', 'international_ngo': 'International NGO', 'military': 'Government', 'religious': 'Other'}}
fixtures = 'tests/fixtures'
mock_downloads = <tests.conftest.mock_downloads.<locals>.MockDownloads object at 0x7feeb53a7c20>
def test_get_org_stats(self, configuration, fixtures, mock_downloads):
with temp_dir(
"test_get_org_stats", delete_on_success=True, delete_on_failure=False
) as folder:
total_public, total_updated_by_cod, total_updated_by_script = main(
mock_downloads, folder
)
assert total_public == 20823
assert total_updated_by_cod == 583
assert total_updated_by_script == 16594
filename = "org_stats.csv"
> assert_files_same(join(fixtures, filename), join(folder, filename))
tests/test_get_org_stats.py:20:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path1 = 'tests/fixtures/org_stats.csv'
path2 = '/tmp/test_get_org_stats/org_stats.csv'
def assert_files_same(path1: str, path2: str) -> None:
"""Asserts that two files are the same and returns delta using.
-, ?, + format if not
Args:
path1 (str): Path to first file
path2 (str): Path to second file
Returns:
None
"""
difflines = compare_files(path1, path2)
> assert len(difflines) == 0, linesep.join([linesep] + difflines)
E AssertionError:
E
E - usaca,US Army Civil Affairs (inactive),USACA,0bf37f0c-204c-4ecd-9e16-06fd581ffaa5,Military,Global,USA,45.73643438,-112.404207,0,0,0,23,37,0,0,0,1,0,,0,,0,,0,,0,,87,No,No,No,No,1,0,0,0,2018-11-29,,No,Yes,0,0,0,0,0,geodata,N
E ? ^^^^ ---
E
E + usaca,US Army Civil Affairs (inactive),USACA,0bf37f0c-204c-4ecd-9e16-06fd581ffaa5,Government,Global,USA,45.73643438,-112.404207,0,0,0,23,37,0,0,0,1,0,,0,,0,,0,,0,,87,No,No,No,No,1,0,0,0,2018-11-29,,No,Yes,0,0,0,0,0,geodata,N
E ? ^^^^^^^^^
common/compare.py:41: AssertionError
Check notice on line 0 in .github
github-actions / Test Results
2 tests found
There are 2 tests, see "Raw output" for the full list of tests.
Raw output
tests.test_get_datasets_info.TestGetDatasetsInfo ‑ test_get_datasets_info
tests.test_get_org_stats.TestGetOrgStats ‑ test_get_org_stats
Loading