zulip/zerver/webhooks
Steve Howell 7fbe08f515 webhook tests: Introduce get_payload.
We introduce get_payload for the relatively
exceptional cases where webhooks return payloads
as dicts.

Having a simple "str" type for get_body will
allow us to extract test helpers that use
payloads from get_body() without the ugly
`Union[str, Dict[str, str]]` annotations.

I also tightened up annotations in a few places
where we now call get_payload (using Dict[str, str]
instead of Dict[str, Any]).

In the zendesk test I explicitly stringify
one of the parameters to satisfy mypy.
2020-08-24 12:34:46 -07:00
..
airbrake webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
alertmanager webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
ansibletower webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
appfollow webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
appveyor webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
basecamp webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
beanstalk webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
beeminder webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
bitbucket mypy: Use str for get_body in bitbucket. 2020-08-24 12:34:46 -07:00
bitbucket2 webhook tests: Avoid check_webhook for multi messages. 2020-08-24 12:34:46 -07:00
bitbucket3 webhook tests: Avoid check_webhook for multi messages. 2020-08-24 12:34:46 -07:00
buildbot webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
canarytoken webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
circleci webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
clubhouse webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
codeship webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
crashlytics webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
delighted webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
deskdotcom python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
dialogflow dialogflow test: Fix nonsensical tests. 2020-08-24 12:34:46 -07:00
dropbox webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
errbit webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
flock webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
freshdesk webhooks: Fix invalid JSON in Freshdesk test fixtures. 2020-08-11 10:47:13 -07:00
front webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gci webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gitea webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
github webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gitlab webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gocd webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gogs webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gosquared webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
grafana webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
greenhouse webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
groove webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
harbor webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
hellosign webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
helloworld webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
heroku webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
homeassistant webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
honeybadger/fixtures inetgrations: Add webhook payloads for Honeybadger. 2018-01-02 11:45:33 -05:00
ifttt webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
insping webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
intercom webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
jira webhook tests: Extract assert_stream_message. 2020-08-24 12:34:46 -07:00
librato webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
mention webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
netlify webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
newrelic webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
opbeat webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
opsgenie webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
pagerduty webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
papertrail webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
pingdom webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
pivotal webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
raygun webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
reviewboard webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
rollbar/fixtures integrations: Add webhook payloads for rollbar. 2018-01-11 06:32:37 -05:00
runscope/fixtures integrations: Add webhook payloads for Runscope. 2017-12-29 07:27:20 -05:00
semaphore webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
sentry webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
slack webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
slack_incoming webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
solano webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
splunk webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
statuspage webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
stripe webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
taiga webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
teamcity webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
thinkst webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
transifex webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
travis webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
trello webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
updown webhook tests: Avoid check_webhook for multi messages. 2020-08-24 12:34:46 -07:00
wordpress webhook tests: Rename helper to send_webhook_payload. 2020-08-24 12:34:46 -07:00
yo webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
zabbix webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
zapier webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
zendesk webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
__init__.py