Skip to content

Commit 81a1fba

Browse files
committed
add overwrite_graph coverage
1 parent eb7c2cc commit 81a1fba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ def test_load_graph_from_nxadb_as_smart_graph():
174174
assert G.has_node("Officer:36")
175175
assert G.has_node("Mr.Hi:37")
176176

177+
assert db.collection("smart_person").properties()["smart"]
178+
179+
G = nxadb.Graph(
180+
name=graph_name,
181+
incoming_graph_data=G_NX_copy,
182+
write_async=False,
183+
overwrite_graph=True,
184+
)
185+
186+
assert db.collection("smart_person").properties()["smart"]
187+
assert G.nodes["Mr.Hi:0"]["club"] == "Mr.Hi"
188+
177189
db.delete_graph(graph_name, drop_collections=True)
178190

179191

0 commit comments

Comments
 (0)