import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from app.store import Store # noqa: E402 def test_add_and_get_note(): s = Store() nid = s.add_note("alice", "hello", "world") note = s.get_note(nid) assert note[1] == "alice" assert note[2] == "hello" def test_notes_are_scoped_to_owner(): s = Store() s.add_note("alice", "a", "1") s.add_note("bob", "b", "2") assert len(s.notes_for("alice")) == 1