From 05d006b873756c02f9024c236d9c46763b52c2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 10 Feb 2016 17:46:21 +0100 Subject: [PATCH] tests: minor fixes in int.tools tests --- qubes/tests/int/tools/qubes_create.py | 8 ++++---- qubes/tests/int/tools/qvm_run.py | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/qubes/tests/int/tools/qubes_create.py b/qubes/tests/int/tools/qubes_create.py index c03e6454..284ede2f 100644 --- a/qubes/tests/int/tools/qubes_create.py +++ b/qubes/tests/int/tools/qubes_create.py @@ -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) diff --git a/qubes/tests/int/tools/qvm_run.py b/qubes/tests/int/tools/qvm_run.py index 727731cd..5992980c 100644 --- a/qubes/tests/int/tools/qvm_run.py +++ b/qubes/tests/int/tools/qvm_run.py @@ -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()