tests/file: use self.loop

This commit is contained in:
Rusty Bird 2020-04-07 21:04:02 +00:00
parent 8f0ec59f95
commit 9122a14f94
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -22,7 +22,6 @@
import os
import shutil
import asyncio
import unittest.mock
import subprocess
@ -592,8 +591,7 @@ class TC_03_FilePool(qubes.tests.QubesTestCase):
'pool': 'test-pool'
}
}, label='red')
loop = asyncio.get_event_loop()
loop.run_until_complete(vm.create_on_disk())
self.loop.run_until_complete(vm.create_on_disk())
expected_vmdir = os.path.join(self.APPVMS_DIR, vm.name)
@ -622,8 +620,7 @@ class TC_03_FilePool(qubes.tests.QubesTestCase):
'pool': 'test-pool'
}
}, label='red')
loop = asyncio.get_event_loop()
loop.run_until_complete(vm.create_on_disk())
self.loop.run_until_complete(vm.create_on_disk())
expected_vmdir = os.path.join(self.TEMPLATES_DIR, vm.name)