mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 06:14:51 +00:00
Answer 404 when a wiki settings change finds no row to update
This commit is contained in:
1 parent
c66afd6b30
commit
91e70d2f0c
2 files changed
+19
-4
No files matched your search
@@ -705,3 +705,15 @@ class TestWikiSettings:
|
||||
)
|
||||
assert response.status_code == 400
|
||||
assert self._stored(pg_conn, sid) is False
|
||||
|
||||
def test_no_row_updated_is_404(self, app, pg_conn):
|
||||
sid = self._wiki(pg_conn, "alice-ws-gone")
|
||||
with patch(
|
||||
"docsgpt.storage.db.repositories.sources.SourcesRepository.set_wiki_outside_edits",
|
||||
return_value=False,
|
||||
):
|
||||
response = _settings_call(
|
||||
app, pg_conn, sid, "alice-ws-gone", "PUT", {"allow_outside_edits": True}
|
||||
)
|
||||
assert response.status_code == 404
|
||||
assert response.json["success"] is False
|
||||
Reference in new issue
Block a user