Beispiel #1
0
  def testLinkWithParent(self):
    n1 = Node('n1')
    n2 = Node('n2')
    n1.addLinkTo(n2)

    self.assertEqual('n1', n2.parent.label)
Beispiel #2
0
  def testNodeWithLinkToOtherNode(self):
    n1 = Node('n1')
    n2 = Node('n2')
    n1.addLinkTo(n2)

    self.assertEqual('n2', n1.links[0].label)