Exemplo n.º 1
0
    def test_will_return_parent_when_child_when_given_type_id(self):
        n0 = BuildDependencyNode(self.class0)
        n1 = BuildDependencyNode(self.class1)
        n0.add_child(n1)

        p = n0.find_parent(n1.cls.type_id)

        self.assertIs(p, n0)
Exemplo n.º 2
0
    def test_will_return_None_when_root(self):
        n0 = BuildDependencyNode(self.class0)
        n1 = BuildDependencyNode(self.class1)
        n0.add_child(n1)

        p = n0.find_parent(n1)

        self.assertIs(p, n0)