예제 #1
0
 def test_construction_from_three_arguments(self):
     rel = Relationship(alice, "KNOWS", bob)
     assert repr(rel)
     assert rel.start_node() is alice
     assert rel.end_node() is bob
     assert rel.type() == "KNOWS"
예제 #2
0
 def test_construction_from_one_argument(self):
     rel = Relationship("KNOWS")
     assert repr(rel)
     assert rel.start_node() is None
     assert rel.end_node() is None
     assert rel.type() == "KNOWS"
예제 #3
0
 def test_construction_from_two_arguments(self):
     rel = Relationship(alice, bob)
     assert repr(rel)
     assert rel.start_node() is alice
     assert rel.end_node() is bob
     assert rel.type() is None
예제 #4
0
 def test_construction_from_zero_arguments(self):
     rel = Relationship()
     assert repr(rel)
     assert rel.start_node() is None
     assert rel.end_node() is None
     assert rel.type() is None
예제 #5
0
 def test_construction_from_three_arguments(self):
     rel = Relationship(alice, "KNOWS", bob)
     assert repr(rel)
     assert rel.start_node() is alice
     assert rel.end_node() is bob
     assert rel.type() == "KNOWS"
예제 #6
0
 def test_construction_from_two_arguments(self):
     rel = Relationship(alice, bob)
     assert repr(rel)
     assert rel.start_node() is alice
     assert rel.end_node() is bob
     assert rel.type() is None
예제 #7
0
 def test_construction_from_one_argument(self):
     rel = Relationship("KNOWS")
     assert repr(rel)
     assert rel.start_node() is None
     assert rel.end_node() is None
     assert rel.type() == "KNOWS"
예제 #8
0
 def test_construction_from_zero_arguments(self):
     rel = Relationship()
     assert repr(rel)
     assert rel.start_node() is None
     assert rel.end_node() is None
     assert rel.type() is None