feat: file edit added
This commit is contained in:
@@ -49,18 +49,15 @@ class ViewApiGoldenTest(unittest.TestCase):
|
||||
response = self._request("storage1/notes.md")
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(
|
||||
response.json(),
|
||||
{
|
||||
"path": "storage1/notes.md",
|
||||
"name": "notes.md",
|
||||
"content_type": "text/markdown",
|
||||
"encoding": "utf-8",
|
||||
"truncated": False,
|
||||
"size": len("# title\nhello\n".encode("utf-8")),
|
||||
"content": "# title\nhello\n",
|
||||
},
|
||||
)
|
||||
body = response.json()
|
||||
self.assertEqual(body["path"], "storage1/notes.md")
|
||||
self.assertEqual(body["name"], "notes.md")
|
||||
self.assertEqual(body["content_type"], "text/markdown")
|
||||
self.assertEqual(body["encoding"], "utf-8")
|
||||
self.assertFalse(body["truncated"])
|
||||
self.assertEqual(body["size"], len("# title\nhello\n".encode("utf-8")))
|
||||
self.assertEqual(body["content"], "# title\nhello\n")
|
||||
self.assertIn("modified", body)
|
||||
|
||||
def test_view_unsupported_type(self) -> None:
|
||||
(self.root / "report.pdf").write_bytes(b"%PDF-1.4")
|
||||
|
||||
Reference in New Issue
Block a user