Exemple #1
0
 def test_casting_dict_will_return_node_with_properties(self):
     properties = {"name": "Alice"}
     casted = Node.cast(properties)
     assert casted == Node(**properties)
Exemple #2
0
 def test_casting_node_will_return_same(self):
     node = Node("Person", name="Alice")
     casted = Node.cast(node)
     assert casted is node
Exemple #3
0
 def test_casting_string_will_return_node_with_label(self):
     label = "Person"
     casted = Node.cast(label)
     assert casted == Node(label)
Exemple #4
0
 def test_casting_none_will_return_none(self):
     casted = Node.cast(None)
     assert casted is None
Exemple #5
0
 def test_casting_dict_will_return_node_with_properties(self):
     properties = {"name": "Alice"}
     casted = Node.cast(properties)
     assert casted == Node(**properties)
Exemple #6
0
 def test_casting_string_will_return_node_with_label(self):
     label = "Person"
     casted = Node.cast(label)
     assert casted == Node(label)
Exemple #7
0
 def test_casting_node_will_return_same(self):
     node = Node("Person", name="Alice")
     casted = Node.cast(node)
     assert casted is node
Exemple #8
0
 def test_casting_none_will_return_none(self):
     casted = Node.cast(None)
     assert casted is None