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