Skip to content

Commit

Permalink
Copy a dictionary on use in mock API
Browse files Browse the repository at this point in the history
to avoid re-use of a dictionary object, copy it.
  • Loading branch information
marmarta committed Apr 29, 2024
1 parent e54eb38 commit e56ecc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qubesadmin/tests/mock_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ def setup_device_calls(self):
class MockAdminVM(MockQube):
def __init__(self, qapp):
super().__init__('dom0', qapp, klass='AdminVM', running=True,
features=DEFAULT_DOM0_FEATURES,
override_default_props=DEFAULT_DOM0_PROPERTIES)
features=DEFAULT_DOM0_FEATURES.copy(),
override_default_props=DEFAULT_DOM0_PROPERTIES.copy())
# make all properties that are unknown give an 'unknown property' error
for property_name in DEFAULT_VM_PROPERTIES.keys():
if property_name not in self.properties:
Expand Down

0 comments on commit e56ecc6

Please sign in to comment.