send_webhook_fixture_message: Print useful error messages.

Previously, if this failed, it didn't tell you why.
This commit is contained in:
Tim Abbott 2017-10-20 09:02:32 -07:00
parent 9b791acf50
commit 03d72a1cd6
1 changed files with 5 additions and 2 deletions

View File

@ -56,8 +56,11 @@ Example:
realm = get_realm("zulip")
client = Client()
client.post(options['url'], json, content_type="application/json",
HTTP_HOST=realm.host)
result = client.post(options['url'], json, content_type="application/json",
HTTP_HOST=realm.host)
if result.status_code != 200:
print('Error status %s: %s' % (result.status_code, result.content))
exit(1)
def _does_fixture_path_exist(self, fixture_path):
# type: (str) -> bool