X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=tests%2Futils.py;fp=tests%2Futils.py;h=665436873c27af704a13827715d3c795e04e1fe1;hb=1701d662f8163d5dc93bf87988e740639108f6ad;hp=e0b4e5f2f7c144bffe5120040e3b85a36c91258e;hpb=bc75c875576268d24f6e93af15b6198939785fea;p=plomtask diff --git a/tests/utils.py b/tests/utils.py index e0b4e5f..6654368 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -371,14 +371,13 @@ class TestCaseWithServer(TestCaseWithDB): title: str = 'A', description: str = '', effort: float = 1.0, - enables: None | list[dict[str, object]] = None, - disables: None | list[dict[str, object]] = None, - conditions: None | list[dict[str, object]] = None, - blockers: None | list[dict[str, object]] = None + conditions: None | list[int] = None, + disables: None | list[int] = None, + blockers: None | list[int] = None, + enables: None | list[int] = None ) -> dict[str, object]: """Return JSON of Process to expect.""" # pylint: disable=too-many-arguments - as_id_list = TestCaseWithServer.as_id_list d = {'id': id_, 'calendarize': False, 'suppressed_steps': [], @@ -387,10 +386,10 @@ class TestCaseWithServer(TestCaseWithDB): 'title': {0: title}, 'description': {0: description}, 'effort': {0: effort}}, - 'conditions': as_id_list(conditions) if conditions else [], - 'disables': as_id_list(disables) if disables else [], - 'enables': as_id_list(enables) if enables else [], - 'blockers': as_id_list(blockers) if blockers else []} + 'conditions': conditions if conditions else [], + 'disables': disables if disables else [], + 'enables': enables if enables else [], + 'blockers': blockers if blockers else []} return d def check_redirect(self, target: str) -> None: