def test_order1(self): sc = ServiceDict(OT1.items()) slist = sc.get_startup_list() printlist("startup list: ", slist) self.assertTrue(checkorder(slist, 'three', 'four', 'seven', 'six', 'two')) self.assertTrue(checkorder(slist, 'three', 'one', 'two')) self.assertTrue(checkorder(slist, 'eight', 'one', 'two'))
def test_order1(self): sc = ServiceDict(OT1.items()) slist = sc.get_startup_list() printlist("startup list: ", slist) self.assertTrue( checkorder(slist, 'three', 'four', 'seven', 'six', 'two')) self.assertTrue(checkorder(slist, 'three', 'one', 'two')) self.assertTrue(checkorder(slist, 'eight', 'one', 'two'))
def test_order3(self): sc = ServiceDict(OT3.items()) self.assertRaisesRegex(Exception, '^circular', lambda: sc.get_startup_list())
def test_order2(self): sc = ServiceDict(OT2.items()) slist = sc.get_startup_list() printlist("startup list: ", slist) self.assertTrue(checkorder(slist, 'four', 'three', 'two'))