Add note on check_accept to testing documentation (#676)

When writing tests, sometimes consumers are expected to reject connections, and while there is a check_accept parameter on send_and_consume, it's not documented. This commit adds a note on the use of the parameter to the docs.
This commit is contained in:
Sergio 2017-06-21 15:45:07 -04:00 committed by Andrew Godwin
parent e2444308ff
commit a6a2714a9b

View File

@ -126,7 +126,8 @@ purpose use ``send_and_consume`` method::
client = Client() client = Client()
client.send_and_consume('my_internal_channel', {'value': 'my_value'}) client.send_and_consume('my_internal_channel', {'value': 'my_value'})
self.assertEqual(client.receive(), {'all is': 'done'}) self.assertEqual(client.receive(), {'all is': 'done'})
*Note: if testing consumers that are expected to close the connection when consuming, set the ``check_accept`` parameter to False on ``send_and_consume``.*
You can use ``WSClient`` for websocket related consumers. It automatically serializes JSON content, You can use ``WSClient`` for websocket related consumers. It automatically serializes JSON content,
manage cookies and headers, give easy access to the session and add ability to authorize your requests. manage cookies and headers, give easy access to the session and add ability to authorize your requests.