MCPcopy Create free account
hub / github.com/MemTensor/MemOS / test_get_node

Function test_get_node

tests/graph_dbs/graph_dbs.py:52–69  ·  view source on GitHub ↗
(graph_db)

Source from the content-addressed store, hash-verified

50
51
52def test_get_node(graph_db):
53 session_mock = graph_db.driver.session.return_value.__enter__.return_value
54 node_id = str(uuid.uuid4())
55
56 session_mock.run.return_value.single.return_value = {
57 "n": {
58 "id": node_id,
59 "memory": "hello",
60 "memory_type": "WorkingMemory",
61 "created_at": datetime.utcnow(),
62 "updated_at": datetime.utcnow(),
63 }
64 }
65
66 result = graph_db.get_node(node_id)
67 assert result["id"] == node_id
68 assert result["memory"] == "hello"
69 assert result["metadata"]["memory_type"] == "WorkingMemory"
70
71
72def test_update_node(graph_db):

Callers

nothing calls this directly

Calls 1

get_nodeMethod · 0.45

Tested by

no test coverage detected