1010from basic_memory .mcp .tools import write_note , read_note , delete_note
1111from basic_memory .mcp .tools .write_note import _compose_workspace_project_route
1212from basic_memory .repository .relation_repository import RelationRepository
13- from basic_memory .utils import normalize_newlines
1413
1514
1615# ---------------------------------------------------------------------------
@@ -144,7 +143,7 @@ async def test_write_note(app, test_project):
144143
145144 # Try reading it back via permalink
146145 content = await read_note ("test/test-note" , project = test_project .name )
147- expected = normalize_newlines (
146+ expected = (
148147 dedent ("""
149148 ---
150149 title: Test Note
@@ -179,7 +178,7 @@ async def test_write_note_no_tags(app, test_project):
179178 assert f"[Session: Using project '{ test_project .name } ']" in result
180179 # Should be able to read it back
181180 content = await read_note ("test/simple-note" , project = test_project .name )
182- expected = normalize_newlines (
181+ expected = (
183182 dedent ("""
184183 ---
185184 title: Simple Note
@@ -241,9 +240,8 @@ async def test_write_note_update_existing(app, test_project):
241240 # Try reading it back
242241 content = await read_note ("test/test-note" , project = test_project .name )
243242 assert (
244- normalize_newlines (
245- dedent (
246- """
243+ dedent (
244+ """
247245 ---
248246 title: Test Note
249247 type: note
@@ -256,10 +254,9 @@ async def test_write_note_update_existing(app, test_project):
256254 # Test
257255 This is an updated note
258256 """
259- )
260- .format (permalink = f"{ test_project .name } /test/test-note" )
261- .strip ()
262257 )
258+ .format (permalink = f"{ test_project .name } /test/test-note" )
259+ .strip ()
263260 == content
264261 )
265262
@@ -555,9 +552,8 @@ async def test_write_note_preserves_content_frontmatter(app, test_project):
555552 # Try reading it back via permalink
556553 content = await read_note ("test/test-note" , project = test_project .name )
557554 assert (
558- normalize_newlines (
559- dedent (
560- """
555+ dedent (
556+ """
561557 ---
562558 title: Test Note
563559 type: note
@@ -573,10 +569,9 @@ async def test_write_note_preserves_content_frontmatter(app, test_project):
573569
574570 This is a test note
575571 """
576- )
577- .format (permalink = f"{ test_project .name } /test/test-note" )
578- .strip ()
579572 )
573+ .format (permalink = f"{ test_project .name } /test/test-note" )
574+ .strip ()
580575 in content
581576 )
582577
@@ -711,7 +706,7 @@ async def test_write_note_with_custom_note_type(app, test_project):
711706
712707 # Verify the note type is correctly set in the frontmatter
713708 content = await read_note ("guides/test-guide" , project = test_project .name )
714- expected = normalize_newlines (
709+ expected = (
715710 dedent ("""
716711 ---
717712 title: Test Guide
0 commit comments