diff --git a/templates/zerver/api/writing-bots.md b/templates/zerver/api/writing-bots.md index 91cd5b0e64..402258633b 100644 --- a/templates/zerver/api/writing-bots.md +++ b/templates/zerver/api/writing-bots.md @@ -464,7 +464,22 @@ following helper method: # self.assert_bot_response(...) `mock_http_conversation(fixture_name)` patches `requests.get` and returns the data specified -in the file `fixtures/.py`. For an example, check out the [giphy bot]( +in the file `fixtures/.json`. Use the following JSON code as a skeleton for new +fixtures: +``` +{ + "request": { + "api_url": "http://api.example.com/", + "params": { + } + }, + "response": { + }, + "response-headers": { + } +} +``` +For an example, check out the [giphy bot]( https://github.com/zulip/python-zulip-api/tree/master/zulip_bots/zulip_bots/bots/giphy). *Tip: You can use [requestb.in](http://requestb.in) or a similar tool to capture payloads from the