1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

test: the computes tests share one fake libvirt domain

test_ownership, test_ownership_race and test_reconciliation each defined
the same fake domain (a name and a UUID); it is computes/tests/fakes.py.
This commit is contained in:
catborise 2026-11-06 11:18:11 +03:00
parent 00fb8c1d21
commit 4e0952aa50
4 changed files with 23 additions and 40 deletions

14
computes/tests/fakes.py Normal file
View file

@ -0,0 +1,14 @@
"""Test doubles for the computes tests."""
class Domain:
"""A libvirt domain as the VM list reads it: its name and UUID."""
def __init__(self, name, uuid):
self._name, self._uuid = name, uuid
def name(self):
return self._name
def UUIDString(self):
return self._uuid