def test_casting_dict_will_return_node_with_properties(self): properties = {"name": "Alice"} casted = Node.cast(properties) assert casted == Node(**properties)
def test_casting_node_will_return_same(self): node = Node("Person", name="Alice") casted = Node.cast(node) assert casted is node
def test_casting_string_will_return_node_with_label(self): label = "Person" casted = Node.cast(label) assert casted == Node(label)
def test_casting_none_will_return_none(self): casted = Node.cast(None) assert casted is None