* fix(interpreter): remove statement (#168) * refactor(table): hitomi changes applied * refactor(domain): hitomi changes applied * refactor(table): hitomi changes applied * refactor(types): hitomi changes applied * chore(vscode): add snippets * refactor(orm): hitomi changes applied * feat(odm): migration to mongodb (#169) * feat(odm): migration to mongodb * feat(config): add config for atlas search * feat: apply changed * chore(deps): add dependency * test: apply changed * test(config): apply changed * chore(deps): bump up version motor * feat!(parser): remove parser * feat(interpreter): add get thumbnail method * feat!(info): using galleryinfo * feat(functions): add getthumbnail method * feat!(hitomi): remove get info method * fix(image): now return only webp or avif * refactor(info): apply hitomi changed * refactor(mirroring): apply hitomi changed * fix(types): thumbnail is file * test(common): edit dict * style: apply code style * feat(info): add from dict method * style(info): fix type issue * test(arg): fix test * style(info): apply isort * fix(domain): init false * test(common): edit info * test(conftest): edit image url * test(mirroring): fix test * fix(function): add base * test(conftest): edit image url fixture * test(conftest): fix conftest * test(conftest): fix conftest
21 lines
666 B
Python
21 lines
666 B
Python
from asyncio import TimeoutError, wait_for
|
|
from asyncio.events import AbstractEventLoop
|
|
|
|
from pytest import mark
|
|
|
|
from heliotrope.sanic import Heliotrope
|
|
from heliotrope.tasks.mirroring import MirroringTask
|
|
|
|
|
|
@mark.asyncio
|
|
@mark.timeout(120)
|
|
@mark.flaky(reruns=5, reruns_delay=5)
|
|
async def test_mirroring_task(fake_app: Heliotrope, event_loop: AbstractEventLoop):
|
|
try:
|
|
await wait_for(MirroringTask.setup(fake_app, 5), 15)
|
|
except TimeoutError:
|
|
info_total = await fake_app.ctx.odm.get_all_index()
|
|
galleryinfo_total = await fake_app.ctx.orm.get_all_index()
|
|
|
|
assert len(galleryinfo_total) >= 1
|
|
assert len(info_total) >= 1
|