Skip to content

Commit

Permalink
fix: coverage in new status fields (projectcaluma#1650)
Browse files Browse the repository at this point in the history
Those status fields are only used for the type system, but not as actual
input types. Thus, they're never actually instantiated
  • Loading branch information
David Vogt authored and fugal-dy committed Feb 16, 2022
1 parent 9e6b6cd commit b935327
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions caluma/caluma_workflow/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ def __init__(self, **kwargs):


class CaseStatusField(serializers.CalumaChoiceField):
def __init__(self, **kwargs):
# Required for the type system, case status is
# never part of an input
def __init__(self, **kwargs): # pragma: no cover
super().__init__([s for s, _ in models.Case.STATUS_CHOICE_TUPLE], **kwargs)


class WorkItemStatusField(serializers.CalumaChoiceField):
def __init__(self, **kwargs):
# Required for the type system, workitem status is
# never part of an input
def __init__(self, **kwargs): # pragma: no cover
super().__init__([s for s, _ in models.WorkItem.STATUS_CHOICE_TUPLE], **kwargs)


Expand Down

0 comments on commit b935327

Please sign in to comment.