diff options
| author | 2020-06-21 13:51:17 +0200 | |
|---|---|---|
| committer | 2020-06-21 13:55:39 +0200 | |
| commit | 6fa8caed037b247a7c194f58a4635de7dae21fd2 (patch) | |
| tree | 8fa78555f850c73d0b2766481eaf94b841a966a5 /tests/helpers.py | |
| parent | Incidents tests: assert webhook username is de-clyded (diff) | |
Incidents: implement `make_username` helper
The justification is to incorporate the `actioned_by` name into the
username in some way, and so the logical thing to do is to abstract
this process into a helper so that it can easily be adjusted in the
future. For now, I've chosen to separate the names by a pipe.
Discord webhook username cannot exceed 80 characters in length, and
so we cap it at this length by default. This is seen as more of an
edge-case, but it should be accounted for, as we're not joining two
names. The `max_length` param is configurable primarily for testing
purposes, it probably should never be passed explicitly.
This commit also provides two tests for the function.
Diffstat (limited to 'tests/helpers.py')
0 files changed, 0 insertions, 0 deletions