Esempio n. 1
0
 def test_empty(self):
     act = tuple(mux.MuxTree(mux.MuxTreeNode()))
     self.assertEqual(act, ([
         '',
     ], ))
Esempio n. 2
0
 def test_create_variants(self):
     tree_yaml_path = os.path.join(BASEDIR, 'tests/.data/mux-selftest.yaml')
     tree_yaml_url = '/:%s' % tree_yaml_path
     from_file = yaml_to_mux.create_from_yaml([tree_yaml_url])
     from_file = mux.MuxTree(from_file)
     self.assertEqual(self.mux_full, tuple(from_file))
Esempio n. 3
0
 def setUp(self):
     tree_yaml_path = os.path.join(BASEDIR, 'tests/.data/mux-selftest.yaml')
     tree_yaml_url = '/:%s' % tree_yaml_path
     self.mux_tree = yaml_to_mux.create_from_yaml([tree_yaml_url])
     self.mux_full = tuple(mux.MuxTree(self.mux_tree))
Esempio n. 4
0
 def test_partial(self):
     exp = (['intel', 'scsi'], ['intel', 'virtio'], ['amd', 'scsi'],
            ['amd', 'virtio'], ['arm', 'scsi'], ['arm', 'virtio'])
     act = tuple(mux.MuxTree(self.mux_tree.children[0]))
     self.assertEqual(act, exp)