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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user