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"
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"
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
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