Skip to content
Snippets Groups Projects
Verified Commit 72f54ef8 authored by Georg Krause's avatar Georg Krause
Browse files

test: Fix failing crawler tests

parent c041b7ac
No related branches found
No related tags found
No related merge requests found
Pipeline #26476 passed with stages
in 6 minutes and 1 second
......@@ -36,7 +36,7 @@ async def test_check(db_conn, populated_db, session, mocker, coroutine_mock):
crawler, "clean_check", return_value={"cleaned": "check"}
)
save_check = mocker.patch.object(crawler, "save_check", coroutine_mock())
await crawler.check(db_conn, session, "test.domain")
await crawler.check(session, "test.domain")
fetch_nodeinfo.assert_called_once_with(session, "test.domain")
clean_nodeinfo.assert_called_once_with({"hello": "world"})
clean_check.assert_called_once_with(
......@@ -54,7 +54,7 @@ async def test_check_nodeinfo_connection_error(
coroutine_mock(side_effect=aiohttp.client_exceptions.ClientError),
)
save_check = mocker.patch.object(crawler, "save_check", coroutine_mock())
await crawler.check(db_conn, session, "test.domain")
await crawler.check(session, "test.domain")
fetch_nodeinfo.assert_called_once_with(session, "test.domain")
save_check.assert_called_once_with({"domain": "test.domain", "up": False})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment