X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Ftests%2Funit%2Futils.py;h=2f107a71eebb39debf542b7ad1f73824f7b54c0f;hp=ac86cdd7065735320b3b179fc072f7a92c1b13c3;hb=refs%2Fchanges%2F16%2F10616%2F9;hpb=667696ef11356f3267df58f2a81c6ecebb0e94b9 diff --git a/n2vc/tests/unit/utils.py b/n2vc/tests/unit/utils.py index ac86cdd..2f107a7 100644 --- a/n2vc/tests/unit/utils.py +++ b/n2vc/tests/unit/utils.py @@ -82,7 +82,18 @@ class FakeN2VC(MagicMock): detailed_status: str, vca_status: str, entity_type: str, + vca_id: str = None, ): + """ + Write application status to database + + :param: db_dict: DB dictionary + :param: status: Status of the application + :param: detailed_status: Detailed status + :param: vca_status: VCA status + :param: entity_type: Entity type ("application", "machine, and "action") + :param: vca_id: Id of the VCA. If None, the default VCA will be used. + """ self.last_written_values = Dict( { "n2vc_status": status, @@ -162,6 +173,9 @@ class FakeApplication(AsyncMock): async def get_actions(self): return ["existing_action"] + async def get_config(self): + return ["app_config"] + units = [FakeUnit(), FakeUnit()]