mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 12:16:20 +00:00
Clear bot-flagged test nits and annotate the sandbox workspace path
Wrap a storage read in a context manager (close the file handle), add a comment on the expected SandboxCapacityError in the churn test, and unify the artifacts-routes test on a single import style. Also annotate the intentional per-session sandbox workspace path with # nosec B108 (controlled dir inside the runner container, not an insecure shared temp file).
This commit is contained in:
1 parent
0d67734fdd
commit
00896eb828
4 files changed
+5
-3
No files matched your search
@@ -177,7 +177,8 @@ def test_attachments_bridge_to_run_scoped_artifacts(pg_engine, tmp_path, monkeyp
|
||||
# The bytes round-trip from storage (never entered state).
|
||||
with pg_engine.connect() as conn:
|
||||
v = ArtifactsRepository(conn).get_version(refs[0]["artifact_id"], 1)
|
||||
assert storage.get_file(v["storage_path"]).read() == a1
|
||||
with storage.get_file(v["storage_path"]) as fh:
|
||||
assert fh.read() == a1
|
||||
|
||||
|
||||
def test_attachments_capped_per_run(pg_engine, tmp_path, monkeypatch):
|
||||
|
||||
Reference in new issue
Block a user