From 2061f2a382b136382e18d6302fcd53053654e1ce Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Sat, 31 Aug 2019 02:10:18 -0300 Subject: [PATCH] [doc] cb_kwargs contract --- docs/topics/contracts.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/topics/contracts.rst b/docs/topics/contracts.rst index 957761b76..62f9a743b 100644 --- a/docs/topics/contracts.rst +++ b/docs/topics/contracts.rst @@ -35,12 +35,20 @@ This callback is tested using three built-in contracts: .. class:: UrlContract - This contract (``@url``) sets the sample url used when checking other + This contract (``@url``) sets the sample URL used when checking other contract conditions for this spider. This contract is mandatory. All callbacks lacking this contract are ignored when running the checks:: @url url +.. class:: CallbackKeywordArgumentsContract + + This contract (``@cb_kwargs``) sets the :attr:`cb_kwargs ` + attribute for the sample request. It must be a valid JSON dictionary. + :: + + @cb_kwargs {"arg1": "value1", "arg2": "value2", ...} + .. class:: ReturnsContract This contract (``@returns``) sets lower and upper bounds for the items and