Skip to content

Commit

Permalink
tests: add GenMetadataEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Jan 13, 2024
1 parent 3542f82 commit 34744f7
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/ai_horde_api/test_ai_horde_api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
FindUserResponse,
UsageDetails,
)
from horde_sdk.ai_horde_api.apimodels.base import GenMetadataEntry
from horde_sdk.ai_horde_api.apimodels.generate._async import (
ImageGenerateAsyncRequest,
ImageGenerationInputPayload,
Expand All @@ -15,7 +16,13 @@
WorkerDetailItem,
WorkerKudosDetails,
)
from horde_sdk.ai_horde_api.consts import KNOWN_SAMPLERS, KNOWN_SOURCE_PROCESSING, WORKER_TYPE
from horde_sdk.ai_horde_api.consts import (
KNOWN_SAMPLERS,
KNOWN_SOURCE_PROCESSING,
METADATA_TYPE,
METADATA_VALUE,
WORKER_TYPE,
)


def test_api_endpoint() -> None:
Expand Down Expand Up @@ -278,3 +285,16 @@ def test_FindUserResponse() -> None:
worker_invited=False,
vpn=False,
)


def test_GenMetadataEntry() -> None:
GenMetadataEntry(
type=METADATA_TYPE.batch_index,
value=METADATA_VALUE.see_ref,
ref="1",
)

GenMetadataEntry(
type="test key",
value="test value",
)

0 comments on commit 34744f7

Please sign in to comment.