caplog = <_pytest.logging.LogCaptureFixture object at 0x7f2ada551780>
swh_storage = <swh.storage.proxies.retry.RetryingProxyStorage object at 0x7f2ada551898>
requests_mock_datadir = <requests_mock.mocker.Mocker object at 0x7f2ada582358>
def test_directory_loader_ok_with_fallback(caplog, swh_storage, requests_mock_datadir):
dead_origin = Origin(f"{DIRECTORY_MIRROR}/dead-origin-url")
fallback_url_ok = DIRECTORY_URL
fallback_url_ko = f"{DIRECTORY_MIRROR}/archives/unknown2.tgz"
loader = DirectoryLoader(
swh_storage,
dead_origin.url,
fallback_urls=[fallback_url_ok, fallback_url_ko],
integrity=DIRECTORY_INTEGRITY,
)
result = loader.load()
> assert result == {"status": "eventful"}
E AssertionError: assert {'status': 'uneventful'} == {'status': 'eventful'}
E Differing items:
E {'status': 'uneventful'} != {'status': 'eventful'}
E Full diff:
E - {'status': 'eventful'}
E + {'status': 'uneventful'}
E ? ++
.tox/py3/lib/python3.7/site-packages/swh/loader/core/tests/test_loader.py:676: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Sep 30 2022, 12:04 PM