Cover the chunks fallbacks on agent update and YAML import

A blank chunks on update and an unparsable one on import both fall back
to the default.
This commit is contained in:
arc53-machine committed 2026-09-28 14:55:43 +01:00
1 parent c40f06e10b
commit 56aebc882c
2 files changed
+24

No files matched your search

+7
View File
@@ -183,6 +183,13 @@ def test_import_without_chunks_uses_the_default(pg_conn):
assert agent["chunks"] == 6
def test_import_with_invalid_chunks_uses_the_default(pg_conn):
user = "u_invalid_chunks"
result = apply_import(pg_conn, user, _doc(name="Odd Bot", _slug="odd-bot", chunks="lots"))
agent = AgentsRepository(pg_conn).get(result["agent_id"], user)
assert agent["chunks"] == 6
def test_import_keeps_explicit_chunks(pg_conn):
user = "u_explicit_chunks"
result = apply_import(pg_conn, user, _doc(name="Off Bot", _slug="off-bot", chunks=0))