forked from enderofwings/NexusOS
test(curry): keep preload check repeatable
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
"""synapse/curry_core.py (vendored) + synapse/curry_store.py (NexusOS's preload).
|
||||
|
||||
Two concerns: the vendor sync didn't silently drop the sandbox fix from
|
||||
https://github.com/Athena-Pro/Curry/pull/4, and curry_store actually gives
|
||||
NexusOS a live, callable instance without wiring it into any chat-facing tool.
|
||||
https://github.com/Athena-Pro/Curry/pull/4, and curry_store gives NexusOS a
|
||||
live instance for the registered chat tools.
|
||||
"""
|
||||
import pytest
|
||||
|
||||
@@ -10,14 +10,12 @@ from synapse.curry_core import Curry, TypeSignature
|
||||
from synapse import curry_store
|
||||
|
||||
|
||||
def test_curry_store_is_preloaded_and_callable():
|
||||
def test_curry_store_is_preloaded_and_open():
|
||||
# curry_store.curry_db is a module-level singleton constructed at import
|
||||
# time (mirrors synapse.memory.store.store / synapse.playbooks.store.playbook_store)
|
||||
# - by the time this test runs, it has already opened its database file.
|
||||
assert isinstance(curry_store.curry_db, Curry)
|
||||
curry_store.curry_db.declare_constant("t_preload_check", 1, 1, TypeSignature.INT32.value)
|
||||
assert curry_store.curry_db.get_constant_latest("t_preload_check")["value"] == 1
|
||||
curry_store.curry_db.retire_constant("t_preload_check", 1)
|
||||
assert curry_store.curry_db.conn.execute("SELECT 1").fetchone()[0] == 1
|
||||
|
||||
|
||||
def test_curry_db_path_matches_nexus_config(tmp_path, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user