tests/fprintd: Only enable 'virtual_image' driver

When we run tests in a system with real devices, we may try to initialize
the real ones, while we can just ignore them all in tests.

We do it in setUp instead of setUpClass to allow tests to change this if
they need to, but just for temporary.
This commit is contained in:
Marco Trevisan (Treviño)
2020-02-08 09:37:08 +01:00
committed by Bastien Nocera
parent 22ad9b5ae8
commit 3821b96ca5

View File

@ -262,6 +262,7 @@ class FPrintdTest(dbusmock.DBusTestCase):
self.addCleanup(shutil.rmtree, self.test_dir)
self.state_dir = os.path.join(self.test_dir, 'state')
self.run_dir = os.path.join(self.test_dir, 'run')
os.environ['FP_DRIVERS_WHITELIST'] = 'virtual_image'
# From libfprint tests
def send_retry(self, retry_error=FPrint.DeviceRetry.TOO_SHORT):