Skip to content

Commit

Permalink
chore: Allow stream_id to be 9-10 chars (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare authored Feb 14, 2024
1 parent 676198d commit d06b0a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions suisa_sendemeldung/suisa_sendemeldung.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def validate_arguments(parser, args):
)
)
# check length of stream_id
if not len(args.stream_id) == 9:
if len(args.stream_id) not in [9, 10]:
msgs.append(
f"wrong format on stream_id, expected 9 characters but got {len(args.stream_id)}"
f"wrong format on stream_id, expected 9 or 10 characters but got {len(args.stream_id)}"
)
# one output option has to be set
if not (args.file or args.email or args.stdout):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_suisa_sendemeldung.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_validate_arguments():
mock.error.assert_called_once_with(
"\n"
"- wrong format on bearer_token, expected larger than 32 characters but got 31\n"
"- wrong format on stream_id, expected 9 characters but got 12\n"
"- wrong format on stream_id, expected 9 or 10 characters but got 12\n"
"- no output option has been set, specify one of --file, --email or --stdout\n"
"- argument --last_month not allowed with --start_date or --end_date"
)
Expand All @@ -45,7 +45,7 @@ def test_validate_arguments():
mock.error.assert_called_once_with(
"\n"
"- wrong format on bearer_token, expected larger than 32 characters but got 31\n"
"- wrong format on stream_id, expected 9 characters but got 12\n"
"- wrong format on stream_id, expected 9 or 10 characters but got 12\n"
"- xlsx cannot be printed to stdout, please set --filetype to csv\n"
"- argument --last_month not allowed with --start_date or --end_date"
)
Expand Down

0 comments on commit d06b0a6

Please sign in to comment.