tests(mm): update tests to reflect using UUID for key

This commit is contained in:
psychedelicious 2024-03-03 14:22:15 +11:00
parent 554d175792
commit 2f372d9b18

View File

@ -3,6 +3,7 @@ Test the model installer
""" """
import platform import platform
import uuid
from pathlib import Path from pathlib import Path
import pytest import pytest
@ -30,9 +31,8 @@ def test_registration(mm2_installer: ModelInstallServiceBase, embedding_file: Pa
matches = store.search_by_attr(model_name="test_embedding") matches = store.search_by_attr(model_name="test_embedding")
assert len(matches) == 0 assert len(matches) == 0
key = mm2_installer.register_path(embedding_file) key = mm2_installer.register_path(embedding_file)
assert key is not None # Not raising here is sufficient - key should be UUIDv4
assert key != "<NOKEY>" uuid.UUID(key, version=4)
assert len(key) == 32
def test_registration_meta(mm2_installer: ModelInstallServiceBase, embedding_file: Path) -> None: def test_registration_meta(mm2_installer: ModelInstallServiceBase, embedding_file: Path) -> None: