MCPcopy Create free account
hub / github.com/Pometry/Raphtory / test_upload_graph

Function test_upload_graph

python/tests/test_auth.py:341–355  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

339
340
341def test_upload_graph():
342 work_dir = tempfile.mkdtemp()
343 with GraphServer(
344 work_dir, config={"auth": {"public_key": PUB_KEY}}
345 ).start() as server:
346 port = server.port()
347 client = RaphtoryClient(url=raphtory_url(port), token=WRITE_JWT)
348 g = Graph()
349 g.add_node(0, "uploaded-node")
350 tmp_dir = tempfile.mkdtemp()
351 path = tmp_dir + "/graph"
352 g.save_to_zip(path)
353 client.upload_graph(path="uploaded", file_path=path)
354 g = client.receive_graph("uploaded")
355 assert g.node("uploaded-node") is not None

Callers

nothing calls this directly

Calls 9

GraphServerClass · 0.90
GraphClass · 0.90
raphtory_urlFunction · 0.85
startMethod · 0.45
portMethod · 0.45
add_nodeMethod · 0.45
upload_graphMethod · 0.45
receive_graphMethod · 0.45
nodeMethod · 0.45

Tested by

no test coverage detected