From a0feb512355ac5cfbeb5fd1233d00d4ef335f94b Mon Sep 17 00:00:00 2001 From: Finn Rea <37559384+finnrea78@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:55:45 +0000 Subject: [PATCH 1/5] Update README to include a test section Added a test section to the README. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7b12a5c..5bdf5a8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Move37 +test + Move37 is a prototype human operating system for the AI age: a system designed to help a person stay organized, protect focus, and make steady progress toward their goals. In this repo, it currently takes the form of: - a FastAPI backend for auth, activity-graph, notes, and chat workflows From 4be449e799d8540b4f6faf6ba0a1b4f17b055fee Mon Sep 17 00:00:00 2001 From: Finn Rea <37559384+finnrea78@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:59:09 +0000 Subject: [PATCH 2/5] Clean up README by removing placeholder text Removed the placeholder 'test' line from the README. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 5bdf5a8..7b12a5c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Move37 -test - Move37 is a prototype human operating system for the AI age: a system designed to help a person stay organized, protect focus, and make steady progress toward their goals. In this repo, it currently takes the form of: - a FastAPI backend for auth, activity-graph, notes, and chat workflows From 06465081677b8f5dcee636637513b17421aa6860 Mon Sep 17 00:00:00 2001 From: Finn Rea <37559384+finnrea78@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:07:17 +0000 Subject: [PATCH 3/5] feat: Add tests for note retrieval and import validation --- src/move37/tests/test_api.py | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/move37/tests/test_api.py b/src/move37/tests/test_api.py index a8bb99d..f6e3315 100644 --- a/src/move37/tests/test_api.py +++ b/src/move37/tests/test_api.py @@ -216,6 +216,47 @@ def test_import_url_surfaces_fetch_failures(self, client_cls) -> None: self.assertEqual(api_response.status_code, 503) self.assertEqual(api_response.json()["detail"], "AI service unavailable.") + def test_get_note_returns_404_for_missing_note(self) -> None: + response = self.client.get( + "/v1/notes/99999", + headers={"Authorization": "Bearer test-token"}, + ) + + self.assertEqual(response.status_code, 404) + self.assertEqual(response.json()["detail"], "Note not found.") + + def test_patch_note_returns_404_for_missing_note(self) -> None: + response = self.client.patch( + "/v1/notes/99999", + headers={"Authorization": "Bearer test-token"}, + json={"title": "Updated title"}, + ) + + self.assertEqual(response.status_code, 404) + self.assertEqual(response.json()["detail"], "Note not found.") + + def test_import_rejects_non_txt_file(self) -> None: + response = self.client.post( + "/v1/notes/import", + headers={"Authorization": "Bearer test-token"}, + files=[("files", ("data.csv", b"a,b,c", "text/csv"))], + ) + + self.assertEqual(response.status_code, 400) + self.assertEqual(response.json()["detail"], "Only .txt files are supported.") + + def test_import_rejects_unsupported_encoding(self) -> None: + response = self.client.post( + "/v1/notes/import", + headers={"Authorization": "Bearer test-token"}, + files=[("files", ("notes.txt", b"\x80\x81\x82\x83", "text/plain"))], + ) + + self.assertEqual(response.status_code, 400) + self.assertEqual( + response.json()["detail"], + "Unsupported text encoding. Use UTF-8, UTF-8 BOM, or UTF-16.", + ) if __name__ == "__main__": From 8040a9859c3711109e6bd8c832df1cf339ded2c5 Mon Sep 17 00:00:00 2001 From: Finn Rea <37559384+finnrea78@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:08:10 +0000 Subject: [PATCH 4/5] Add files via upload --- src/move37/tests/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/move37/tests/__init__.py diff --git a/src/move37/tests/__init__.py b/src/move37/tests/__init__.py new file mode 100644 index 0000000..e69de29 From 5cc0fca66005ac5cd3971718d79520ed06db4455 Mon Sep 17 00:00:00 2001 From: Finn Rea <37559384+finnrea78@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:16:13 +0000 Subject: [PATCH 5/5] Fix: test for unsupported encoding in import Update test to use a single byte for unsupported encoding. --- src/move37/tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/move37/tests/test_api.py b/src/move37/tests/test_api.py index f6e3315..fd0bb77 100644 --- a/src/move37/tests/test_api.py +++ b/src/move37/tests/test_api.py @@ -249,7 +249,7 @@ def test_import_rejects_unsupported_encoding(self) -> None: response = self.client.post( "/v1/notes/import", headers={"Authorization": "Bearer test-token"}, - files=[("files", ("notes.txt", b"\x80\x81\x82\x83", "text/plain"))], + files=[("files", ("notes.txt", b"\x80", "text/plain"))], ) self.assertEqual(response.status_code, 400)