Skip to content

Commit 3c6bddd

Browse files
committed
Remove wrong 'all_vms' arg in '_create_test_qube()'
The 'all_vms' parameter couldn't be used directly as a fixture in the qube fixture. This is because 'all_vms' is function-scoped and qube is module-scoped. The practical solution here is to just us Qubes().domains direclty.
1 parent 8c78f3c commit 3c6bddd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_viewer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import subprocess
33

44
import pytest
5+
from qubesadmin import Qubes
56

67
from tests.base import (
78
QubeWrapper,
@@ -11,9 +12,9 @@
1112
)
1213

1314

14-
def _create_test_qube(dispvm_template_name, all_vms):
15+
def _create_test_qube(dispvm_template_name):
1516
# VM was running and needs a restart to test on the latest version
16-
if dispvm_template_name in all_vms:
17+
if dispvm_template_name in Qubes().domains:
1718
_kill_test_qube(dispvm_template_name)
1819

1920
# Create disposable based on specified template

0 commit comments

Comments
 (0)