mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 02:16:08 +00:00
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:
1 parent
c40f06e10b
commit
56aebc882c
2 files changed
+24
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user