X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Ftests%2Funit%2Futils.py;h=b2d5c605d5ebf79e034801b529015bcaaf02033b;hp=7e8907fc58ba4f5012466c5b2f60b23201a5fcae;hb=fa02f8a90b7fe1e1b7a80feedef4132bef1ca3e4;hpb=ba1d07263821169bc36b3f9f9f93cbed93baad4a diff --git a/n2vc/tests/unit/utils.py b/n2vc/tests/unit/utils.py index 7e8907f..b2d5c60 100644 --- a/n2vc/tests/unit/utils.py +++ b/n2vc/tests/unit/utils.py @@ -123,6 +123,7 @@ class FakeManualMachine(MagicMock): model_name = "FAKE MODEL" entity_type = "machine" safe_data = {"instance-id": "manual:myid"} + series = "FAKE SERIES" async def destroy(self, force): pass @@ -162,6 +163,12 @@ class FakeUnit(MagicMock): async def run_action(self, action_name, **kwargs): return FakeAction() + @property + def machine_id(self): + return "existing_machine_id" + + name = "existing_unit" + class FakeApplication(AsyncMock): async def set_config(self, config): @@ -170,6 +177,9 @@ class FakeApplication(AsyncMock): async def add_unit(self, to): pass + async def destroy_unit(self, unit_name): + pass + async def get_actions(self): return ["existing_action"]