test: isolate storage presign tests
This commit is contained in:
parent
7c2e6ed571
commit
606980bb7c
2 changed files with 12 additions and 0 deletions
|
|
@ -31,6 +31,12 @@ async def _seed(db):
|
||||||
await s.commit()
|
await s.commit()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def fake_storage(monkeypatch):
|
||||||
|
monkeypatch.setattr(img_svc.r2, "presign_put",
|
||||||
|
lambda key, content_type: f"http://storage.test/{key}")
|
||||||
|
|
||||||
|
|
||||||
def _body(n=1):
|
def _body(n=1):
|
||||||
from shared.schemas import AnnotationShape
|
from shared.schemas import AnnotationShape
|
||||||
return AnnotationUpsert(shapes=[
|
return AnnotationUpsert(shapes=[
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,12 @@ async def _seed(db, n=5):
|
||||||
await s.commit()
|
await s.commit()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def fake_storage(monkeypatch):
|
||||||
|
monkeypatch.setattr(svc.r2, "presign_get",
|
||||||
|
lambda key: f"http://storage.test/{key}")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_pages_cover_dataset_without_overlap(db):
|
async def test_pages_cover_dataset_without_overlap(db):
|
||||||
await _seed(db, 5)
|
await _seed(db, 5)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue