feat: conf toegevoegd
This commit is contained in:
@@ -80,6 +80,19 @@ class EditApiGoldenTest(unittest.TestCase):
|
||||
self.assertEqual(body["content_type"], "text/x-python")
|
||||
self.assertEqual(body["content"], "print('hello')\n")
|
||||
|
||||
def test_edit_view_conf_success(self) -> None:
|
||||
file_path = self.root / "app.conf"
|
||||
file_path.write_text("enabled=true\n", encoding="utf-8")
|
||||
|
||||
response = self._request("GET", "/api/files/view", params={"path": "storage1/app.conf", "for_edit": "true"})
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
body = response.json()
|
||||
self.assertEqual(body["path"], "storage1/app.conf")
|
||||
self.assertEqual(body["name"], "app.conf")
|
||||
self.assertEqual(body["content_type"], "text/plain")
|
||||
self.assertEqual(body["content"], "enabled=true\n")
|
||||
|
||||
def test_save_success(self) -> None:
|
||||
file_path = self.root / "notes.txt"
|
||||
file_path.write_text("hello", encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user