mirror of
https://github.com/Haidra-Org/AI-Horde.git
synced 2026-11-06 05:17:31 +00:00
test(integration): seed the live image reference once per session
- create_app(TESTING=True) skips the Redis bootstrap, and the loader no longer fetches at import, so the end-to-end suite advertised and requested models against an empty reference; a session-scoped autouse fixture now runs the direct loader once, restoring the process-wide reference those tests rely on
This commit is contained in:
1 file changed
+13
@@ -297,3 +297,16 @@ def api_key(app: Flask) -> str:
|
||||
user.refresh_cache()
|
||||
|
||||
return provisioned_api_key
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def _live_image_reference() -> None:
|
||||
"""Load the live image reference once for the whole end-to-end run.
|
||||
|
||||
``create_app(TESTING=True)`` skips the Redis bootstrap, so the direct loader fills the
|
||||
process-wide reference these tests advertise and request models from.
|
||||
"""
|
||||
from horde.model_reference import model_reference
|
||||
|
||||
if not model_reference.reference:
|
||||
model_reference.call_function()
|
||||
Reference in new issue
Block a user