Skip to content

Commit 552b413

Browse files
committed
Adding un test.
1 parent c566266 commit 552b413

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/unit/databases/test_copy.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ def test_convert_node_to_ingest_with_unknown_type_does_not_error(subject):
9595
assert ingest.source.key_values == {}
9696

9797

98+
def test_convert_node_to_ingest_with_none_type_does_not_error(subject):
99+
"""reorganize_node_key_properties should be a no-op when the node type is None."""
100+
input_node = Node(type=None, properties={"name": "bob"})
101+
ingest = subject.convert_node_to_ingest(input_node)
102+
# When type is None, get_node_type_by_name returns None and the method returns early.
103+
assert ingest.source.key_values == {}
104+
105+
98106
def test_convert_relationship_to_ingest(subject):
99107
rel = RelationshipWithNodes(
100108
Node("Person", properties={"name": "Bob"}),

0 commit comments

Comments
 (0)