Quote the projects key in the wrong-shape message and record the one-message decline

This commit was merged in pull request #66.
This commit is contained in:
2026-09-26 15:17:37 +02:00
parent c40c2d5ffa
commit 7d99d49ffb
4 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ class Trust(unittest.TestCase):
config.write_text(json.dumps(shape))
with contextlib.redirect_stderr(io.StringIO()) as err:
loop.trust(["/a"])
self.assertEqual(err.getvalue(), f"could not read {config}: not an object whose projects maps paths to objects\n")
self.assertEqual(err.getvalue(), f"could not read {config}: not an object whose \"projects\" maps paths to objects\n")
self.assertEqual(json.loads(config.read_text()), shape)
data = {"other": 1, "projects": {"/a": {"hasTrustDialogAccepted": True, "kept": 2}}}
config.write_text(json.dumps(data))