blob: e0e9251c58ea05555639d2a1c58157801f13d088 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import pytest
from conftest import DB
from hircine.api.types import Image
@pytest.mark.anyio
async def test_image(gen_image):
images = await DB.add_all(*gen_image)
for db_image in images:
image = Image(db_image)
assert image.id == db_image.id
assert image.hash == db_image.hash
assert image.width == db_image.width
assert image.height == db_image.height
assert image.aspect_ratio == db_image.width / db_image.height
|