From 23e52775b6ca28ba8db9c98cb64b53f189f9716c Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Wed, 13 Jul 2016 21:33:36 +0200 Subject: [PATCH] =?UTF-8?q?qubes.tests.init=20make=20pylint=20happy=20?= =?UTF-8?q?=E2=99=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qubes/tests/init.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qubes/tests/init.py b/qubes/tests/init.py index d8ffa324..351c8081 100644 --- a/qubes/tests/init.py +++ b/qubes/tests/init.py @@ -23,7 +23,6 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -import os import unittest import uuid @@ -70,7 +69,7 @@ class TC_10_property(qubes.tests.QubesTestCase): try: class MyTestHolder(qubes.tests.TestEmitter, qubes.PropertyHolder): testprop1 = qubes.property('testprop1') - except: # pylint: disable=bare-except + except: # pylint: disable=bare-except self.skipTest('MyTestHolder class definition failed') self.holder = MyTestHolder(None) @@ -120,6 +119,7 @@ class TC_10_property(qubes.tests.QubesTestCase): self.assertIs(prop, MyTestHolder.testprop1) self.assertEquals(value, 'testvalue') return 'settervalue' + class MyTestHolder(qubes.tests.TestEmitter, qubes.PropertyHolder): testprop1 = qubes.property('testprop1', setter=setter) holder = MyTestHolder(None) @@ -219,7 +219,6 @@ class TC_20_PropertyHolder(qubes.tests.QubesTestCase): self.holder = TestHolder(xml) - def test_000_property_list(self): self.assertListEqual([p.__name__ for p in self.holder.property_list()], ['testprop1', 'testprop2', 'testprop3', 'testprop4']) @@ -294,9 +293,9 @@ class TestVM(qubes.vm.BaseVM): uuid = uuid.uuid5(uuid.NAMESPACE_DNS, 'testvm') def is_halted(self): - return False + return True - def get_power_state(): + def get_power_state(self): return "Halted" class TestApp(qubes.tests.TestEmitter):