tests: minor fixes in int.tools tests

This commit is contained in:
Marek Marczykowski-Górecki 2016-02-10 17:46:21 +01:00 committed by Wojtek Porczyk
parent 163ab25d4b
commit 05d006b873
2 changed files with 6 additions and 12 deletions

View File

@ -32,13 +32,13 @@ import qubes.tests
class TC_00_qubes_create(
qubes.tests.SystemTestsMixin, qubes.tests.QubesTestCase):
def test_000_basic(self):
self.assertEqual(0, qubes.tools.qubes_create.main((
'--qubesxml', qubes.tests.XMLPATH)))
self.assertEqual(0, qubes.tools.qubes_create.main([
'--qubesxml', qubes.tests.XMLPATH]))
def test_001_property(self):
self.assertEqual(0, qubes.tools.qubes_create.main((
self.assertEqual(0, qubes.tools.qubes_create.main([
'--qubesxml', qubes.tests.XMLPATH,
'--property', 'default_kernel=testkernel')))
'--property', 'default_kernel=testkernel']))
self.assertEqual('testkernel',
qubes.Qubes(qubes.tests.XMLPATH).default_kernel)

View File

@ -40,17 +40,11 @@ import qubes.tests
class TC_00_qvm_run(qubes.tests.SystemTestsMixin, qubes.tests.QubesTestCase):
def setUp(self):
super(TC_00_qvm_run, self).setUp()
self.app = qubes.Qubes.create_empty_store(qubes.tests.XMLPATH,
default_kernel=os.listdir(os.path.join(
qubes.config.system_path['qubes_base_dir'],
qubes.config.system_path['qubes_kernels_base_dir']))[0])
self.app.add_new_vm(qubes.vm.templatevm.TemplateVM,
name=qubes.tests.TEMPLATE,
label='black')
self.init_default_template()
self.vm1 = self.app.add_new_vm(qubes.vm.appvm.AppVM,
name=self.make_vm_name('vm1'),
template=qubes.tests.TEMPLATE,
template=self.app.default_template,
label='red')
self.vm1.create_on_disk()