From 81a1fba9694e52bbdf79426ec69d12c9fb6097e4 Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Mon, 30 Sep 2024 08:56:19 -0400 Subject: [PATCH] add `overwrite_graph` coverage --- tests/test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test.py b/tests/test.py index 2201bb0..c454554 100644 --- a/tests/test.py +++ b/tests/test.py @@ -174,6 +174,18 @@ def test_load_graph_from_nxadb_as_smart_graph(): assert G.has_node("Officer:36") assert G.has_node("Mr.Hi:37") + assert db.collection("smart_person").properties()["smart"] + + G = nxadb.Graph( + name=graph_name, + incoming_graph_data=G_NX_copy, + write_async=False, + overwrite_graph=True, + ) + + assert db.collection("smart_person").properties()["smart"] + assert G.nodes["Mr.Hi:0"]["club"] == "Mr.Hi" + db.delete_graph(graph_name, drop_collections=True)