コード例 #1
0
ファイル: drivertests.py プロジェクト: BillTheBest/clusto
    def testChildrenContents(self):

        p1 = Pool('p1')
        p2 = Pool('p2')

        d1 = Driver('d1')
        d2 = Driver('d2')

        p1.insert(d1)
        p2.insert(d2)
        p2.insert(p1)

        self.assertEqual(sorted([p1,d1,d2]),
                         sorted(p2.contents(search_children=True)))
コード例 #2
0
ファイル: drivertests.py プロジェクト: verma7/clusto
    def testChildrenContents(self):

        p1 = Pool('p1')
        p2 = Pool('p2')

        d1 = Driver('d1')
        d2 = Driver('d2')

        p1.insert(d1)
        p2.insert(d2)
        p2.insert(p1)

        self.assertEqual(sorted([p1, d1, d2]),
                         sorted(p2.contents(search_children=True)))
コード例 #3
0
ファイル: drivertests.py プロジェクト: verma7/clusto
    def testMultipleGrandchildrenContents(self):
        p1 = Pool('p1')
        p2 = Pool('p2')

        d1 = Driver('d1')
        d2 = Driver('d2')
        d3 = Driver('d3')

        p2.insert(d1)
        p2.insert(d2)
        p2.insert(d3)

        p1.insert(p2)

        self.assertEqual(sorted([p2, d1, d2, d3]),
                         sorted(p1.contents(search_children=True)))
コード例 #4
0
ファイル: drivertests.py プロジェクト: BillTheBest/clusto-1
    def testMultipleGrandchildrenContents(self):
        p1 = Pool('p1')
        p2 = Pool('p2')

        d1 = Driver('d1')
        d2 = Driver('d2')
        d3 = Driver('d3')

        p2.insert(d1)
        p2.insert(d2)
        p2.insert(d3)

        p1.insert(p2)

        self.assertEqual(sorted([p2, d1, d2, d3]),
                         sorted(p1.contents(search_children=True)))