tests: fix VMCollection tests

This commit is contained in:
Wojtek Porczyk 2014-12-29 13:11:05 +01:00
parent 9fa3d60d0b
commit c414ab6df0

View File

@ -7,6 +7,7 @@ import lxml.etree
sys.path.insert(0, '../') sys.path.insert(0, '../')
import qubes import qubes
import qubes.events
import qubes.vm import qubes.vm
class TC_10_Label(unittest.TestCase): class TC_10_Label(unittest.TestCase):
@ -99,10 +100,13 @@ class TestVM(qubes.vm.BaseVM):
name = qubes.property('name') name = qubes.property('name')
netid = qid netid = qid
class TestApp(qubes.events.Emitter):
pass
class TC_11_VMCollection(unittest.TestCase): class TC_11_VMCollection(unittest.TestCase):
def setUp(self): def setUp(self):
# XXX passing None may be wrong in the future # XXX passing None may be wrong in the future
self.vms = qubes.VMCollection(None) self.vms = qubes.VMCollection(TestApp())
self.testvm1 = TestVM(None, None, qid=1, name='testvm1') self.testvm1 = TestVM(None, None, qid=1, name='testvm1')
self.testvm2 = TestVM(None, None, qid=2, name='testvm2') self.testvm2 = TestVM(None, None, qid=2, name='testvm2')