Skip to content

Commit

Permalink
Coerce text choices to string in contactmomenten mock responses
Browse files Browse the repository at this point in the history
  • Loading branch information
swrichards committed Oct 31, 2024
1 parent 2476545 commit a3a9c6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/open_inwoner/accounts/views/contactmoments.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ class KCMDict(TypedDict):
identificatie: str
type: str
onderwerp: str
status: str
antwoord: str
new_answer_available: bool
status: str


QuestionValidator = TypeAdapter(Question)


class KlantContactMomentBaseView(
Expand Down
10 changes: 5 additions & 5 deletions src/open_inwoner/openklant/tests/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def __init__(self):
type="SomeType",
kanaal="MAIL",
registratiedatum="2022-01-01T12:00:00Z",
status=Status.afgehandeld,
status=str(Status.afgehandeld),
tekst="Garage verbouwen?",
antwoord="foo",
onderwerp="e_suite_subject_code",
Expand All @@ -204,7 +204,7 @@ def __init__(self):
identificatie="AB123",
type="SomeType",
kanaal="MAIL",
status=Status.afgehandeld,
status=str(Status.afgehandeld),
tekst="Garage verbouwen?",
antwoord="bar",
onderwerp="e_suite_subject_code",
Expand All @@ -217,7 +217,7 @@ def __init__(self):
identificatie="AB123",
type="SomeType",
kanaal="MAIL",
status=Status.afgehandeld,
status=str(Status.afgehandeld),
tekst="Garage verbouwen?",
antwoord="baz",
onderwerp="e_suite_subject_code",
Expand All @@ -231,7 +231,7 @@ def __init__(self):
type="SomeType",
kanaal="intern_initiatief",
registratiedatum="2022-01-01T12:00:00Z",
status=Status.afgehandeld,
status=str(Status.afgehandeld),
tekst="Garage verbouwen?",
antwoord="foo",
onderwerp="e_suite_subject_code",
Expand Down Expand Up @@ -443,7 +443,7 @@ def __init__(self):
type="SomeType",
kanaal="MAIL",
registratiedatum="2022-01-01T12:00:00Z",
status=Status.nieuw,
status=str(Status.nieuw),
text="hey!\n\nwaddup?",
antwoord="foo",
onderwerp="e_suite_subject_code",
Expand Down

0 comments on commit a3a9c6b

Please sign in to comment.