| Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ascii"?> | 
 | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 
 | 3 |           "DTD/xhtml1-transitional.dtd"> | 
 | 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | 
 | 5 | <head> | 
 | 6 |   <title>apiclient.http.HttpRequestMock</title> | 
 | 7 |   <link rel="stylesheet" href="epydoc.css" type="text/css" /> | 
 | 8 |   <script type="text/javascript" src="epydoc.js"></script> | 
 | 9 | </head> | 
 | 10 |  | 
 | 11 | <body bgcolor="white" text="black" link="blue" vlink="#204080" | 
 | 12 |       alink="#204080"> | 
 | 13 | <!-- ==================== NAVIGATION BAR ==================== --> | 
 | 14 | <table class="navbar" border="0" width="100%" cellpadding="0" | 
 | 15 |        bgcolor="#a0c0ff" cellspacing="0"> | 
 | 16 |   <tr valign="middle"> | 
 | 17 |  | 
 | 18 |   <!-- Tree link --> | 
 | 19 |       <th>   <a | 
 | 20 |         href="module-tree.html">Trees</a>   </th> | 
 | 21 |  | 
 | 22 |   <!-- Index link --> | 
 | 23 |       <th>   <a | 
 | 24 |         href="identifier-index.html">Indices</a>   </th> | 
 | 25 |  | 
 | 26 |   <!-- Help link --> | 
 | 27 |       <th>   <a | 
 | 28 |         href="help.html">Help</a>   </th> | 
 | 29 |  | 
 | 30 |       <th class="navbar" width="100%"></th> | 
 | 31 |   </tr> | 
 | 32 | </table> | 
 | 33 | <table width="100%" cellpadding="0" cellspacing="0"> | 
 | 34 |   <tr valign="top"> | 
 | 35 |     <td width="100%"> | 
 | 36 |       <span class="breadcrumbs"> | 
 | 37 |         <a href="apiclient-module.html">Package apiclient</a> :: | 
 | 38 |         <a href="apiclient.http-module.html">Module http</a> :: | 
 | 39 |         Class HttpRequestMock | 
 | 40 |       </span> | 
 | 41 |     </td> | 
 | 42 |     <td> | 
 | 43 |       <table cellpadding="0" cellspacing="0"> | 
 | 44 |         <!-- hide/show private --> | 
 | 45 |         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" | 
 | 46 |     onclick="toggle_private();">hide private</a>]</span></td></tr> | 
 | 47 |         <tr><td align="right"><span class="options" | 
 | 48 |             >[<a href="frames.html" target="_top">frames</a | 
 | 49 |             >] | <a href="apiclient.http.HttpRequestMock-class.html" | 
 | 50 |             target="_top">no frames</a>]</span></td></tr> | 
 | 51 |       </table> | 
 | 52 |     </td> | 
 | 53 |   </tr> | 
 | 54 | </table> | 
 | 55 | <!-- ==================== CLASS DESCRIPTION ==================== --> | 
 | 56 | <h1 class="epydoc">Class HttpRequestMock</h1><p class="nomargin-top"><span class="codelink"><a href="apiclient.http-pysrc.html#HttpRequestMock">source code</a></span></p> | 
 | 57 | <center> | 
| Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame^] | 58 | <center>  <map id="uml_class_diagram_for_apiclien_23" name="uml_class_diagram_for_apiclien_23"> | 
 | 59 | <area shape="rect" id="node65" href="apiclient.http.HttpRequestMock-class.html#__init__" title="Constructor for HttpRequestMock" alt="" coords="17,39,241,57"/> | 
 | 60 | <area shape="rect" id="node65" href="apiclient.http.HttpRequestMock-class.html#execute" title="Execute the request." alt="" coords="17,57,241,76"/> | 
 | 61 | <area shape="rect" id="node1" href="apiclient.http.HttpRequestMock-class.html" title="Mock of HttpRequest." alt="" coords="5,6,253,82"/> | 
| Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 62 | </map> | 
| Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame^] | 63 |   <img src="uml_class_diagram_for_apiclien_23.gif" alt='' usemap="#uml_class_diagram_for_apiclien_23" ismap="ismap" class="graph-without-title" /> | 
| Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 64 | </center> | 
 | 65 | </center> | 
 | 66 | <hr /> | 
 | 67 | <pre class="literalblock"> | 
 | 68 | Mock of HttpRequest. | 
 | 69 |  | 
 | 70 | Do not construct directly, instead use RequestMockBuilder. | 
 | 71 |  | 
 | 72 | </pre> | 
 | 73 |  | 
 | 74 | <!-- ==================== INSTANCE METHODS ==================== --> | 
 | 75 | <a name="section-InstanceMethods"></a> | 
 | 76 | <table class="summary" border="1" cellpadding="3" | 
 | 77 |        cellspacing="0" width="100%" bgcolor="white"> | 
 | 78 | <tr bgcolor="#70b0f0" class="table-header"> | 
 | 79 |   <td colspan="2" class="table-header"> | 
 | 80 |     <table border="0" cellpadding="0" cellspacing="0" width="100%"> | 
 | 81 |       <tr valign="top"> | 
 | 82 |         <td align="left"><span class="table-header">Instance Methods</span></td> | 
 | 83 |         <td align="right" valign="top" | 
 | 84 |          ><span class="options">[<a href="#section-InstanceMethods" | 
 | 85 |          class="privatelink" onclick="toggle_private();" | 
 | 86 |          >hide private</a>]</span></td> | 
 | 87 |       </tr> | 
 | 88 |     </table> | 
 | 89 |   </td> | 
 | 90 | </tr> | 
 | 91 | <tr> | 
 | 92 |     <td width="15%" align="right" valign="top" class="summary"> | 
 | 93 |       <span class="summary-type"> </span> | 
 | 94 |     </td><td class="summary"> | 
 | 95 |       <table width="100%" cellpadding="0" cellspacing="0" border="0"> | 
 | 96 |         <tr> | 
 | 97 |           <td><span class="summary-sig"><a href="apiclient.http.HttpRequestMock-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, | 
 | 98 |         <span class="summary-sig-arg">resp</span>, | 
 | 99 |         <span class="summary-sig-arg">content</span>, | 
 | 100 |         <span class="summary-sig-arg">postproc</span>)</span><br /> | 
 | 101 |       Constructor for HttpRequestMock</td> | 
 | 102 |           <td align="right" valign="top"> | 
 | 103 |             <span class="codelink"><a href="apiclient.http-pysrc.html#HttpRequestMock.__init__">source code</a></span> | 
 | 104 |              | 
 | 105 |           </td> | 
 | 106 |         </tr> | 
 | 107 |       </table> | 
 | 108 |        | 
 | 109 |     </td> | 
 | 110 |   </tr> | 
 | 111 | <tr> | 
 | 112 |     <td width="15%" align="right" valign="top" class="summary"> | 
 | 113 |       <span class="summary-type"> </span> | 
 | 114 |     </td><td class="summary"> | 
 | 115 |       <table width="100%" cellpadding="0" cellspacing="0" border="0"> | 
 | 116 |         <tr> | 
 | 117 |           <td><span class="summary-sig"><a href="apiclient.http.HttpRequestMock-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>, | 
 | 118 |         <span class="summary-sig-arg">http</span>=<span class="summary-sig-default">None</span>)</span><br /> | 
 | 119 |       Execute the request.</td> | 
 | 120 |           <td align="right" valign="top"> | 
 | 121 |             <span class="codelink"><a href="apiclient.http-pysrc.html#HttpRequestMock.execute">source code</a></span> | 
 | 122 |              | 
 | 123 |           </td> | 
 | 124 |         </tr> | 
 | 125 |       </table> | 
 | 126 |        | 
 | 127 |     </td> | 
 | 128 |   </tr> | 
 | 129 |   <tr> | 
 | 130 |     <td colspan="2" class="summary"> | 
 | 131 |     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: | 
 | 132 |       <code>__delattr__</code>, | 
 | 133 |       <code>__format__</code>, | 
 | 134 |       <code>__getattribute__</code>, | 
 | 135 |       <code>__hash__</code>, | 
 | 136 |       <code>__new__</code>, | 
 | 137 |       <code>__reduce__</code>, | 
 | 138 |       <code>__reduce_ex__</code>, | 
 | 139 |       <code>__repr__</code>, | 
 | 140 |       <code>__setattr__</code>, | 
 | 141 |       <code>__sizeof__</code>, | 
 | 142 |       <code>__str__</code>, | 
 | 143 |       <code>__subclasshook__</code> | 
 | 144 |       </p> | 
 | 145 |     </td> | 
 | 146 |   </tr> | 
 | 147 | </table> | 
 | 148 | <!-- ==================== PROPERTIES ==================== --> | 
 | 149 | <a name="section-Properties"></a> | 
 | 150 | <table class="summary" border="1" cellpadding="3" | 
 | 151 |        cellspacing="0" width="100%" bgcolor="white"> | 
 | 152 | <tr bgcolor="#70b0f0" class="table-header"> | 
 | 153 |   <td colspan="2" class="table-header"> | 
 | 154 |     <table border="0" cellpadding="0" cellspacing="0" width="100%"> | 
 | 155 |       <tr valign="top"> | 
 | 156 |         <td align="left"><span class="table-header">Properties</span></td> | 
 | 157 |         <td align="right" valign="top" | 
 | 158 |          ><span class="options">[<a href="#section-Properties" | 
 | 159 |          class="privatelink" onclick="toggle_private();" | 
 | 160 |          >hide private</a>]</span></td> | 
 | 161 |       </tr> | 
 | 162 |     </table> | 
 | 163 |   </td> | 
 | 164 | </tr> | 
 | 165 |   <tr> | 
 | 166 |     <td colspan="2" class="summary"> | 
 | 167 |     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: | 
 | 168 |       <code>__class__</code> | 
 | 169 |       </p> | 
 | 170 |     </td> | 
 | 171 |   </tr> | 
 | 172 | </table> | 
 | 173 | <!-- ==================== METHOD DETAILS ==================== --> | 
 | 174 | <a name="section-MethodDetails"></a> | 
 | 175 | <table class="details" border="1" cellpadding="3" | 
 | 176 |        cellspacing="0" width="100%" bgcolor="white"> | 
 | 177 | <tr bgcolor="#70b0f0" class="table-header"> | 
 | 178 |   <td colspan="2" class="table-header"> | 
 | 179 |     <table border="0" cellpadding="0" cellspacing="0" width="100%"> | 
 | 180 |       <tr valign="top"> | 
 | 181 |         <td align="left"><span class="table-header">Method Details</span></td> | 
 | 182 |         <td align="right" valign="top" | 
 | 183 |          ><span class="options">[<a href="#section-MethodDetails" | 
 | 184 |          class="privatelink" onclick="toggle_private();" | 
 | 185 |          >hide private</a>]</span></td> | 
 | 186 |       </tr> | 
 | 187 |     </table> | 
 | 188 |   </td> | 
 | 189 | </tr> | 
 | 190 | </table> | 
 | 191 | <a name="__init__"></a> | 
 | 192 | <div> | 
 | 193 | <table class="details" border="1" cellpadding="3" | 
 | 194 |        cellspacing="0" width="100%" bgcolor="white"> | 
 | 195 | <tr><td> | 
 | 196 |   <table width="100%" cellpadding="0" cellspacing="0" border="0"> | 
 | 197 |   <tr valign="top"><td> | 
 | 198 |   <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, | 
 | 199 |         <span class="sig-arg">resp</span>, | 
 | 200 |         <span class="sig-arg">content</span>, | 
 | 201 |         <span class="sig-arg">postproc</span>)</span> | 
 | 202 |     <br /><em class="fname">(Constructor)</em> | 
 | 203 |   </h3> | 
 | 204 |   </td><td align="right" valign="top" | 
 | 205 |     ><span class="codelink"><a href="apiclient.http-pysrc.html#HttpRequestMock.__init__">source code</a></span>  | 
 | 206 |     </td> | 
 | 207 |   </tr></table> | 
 | 208 |    | 
 | 209 |   <pre class="literalblock"> | 
 | 210 | Constructor for HttpRequestMock | 
 | 211 |  | 
 | 212 | Args: | 
 | 213 |   resp: httplib2.Response, the response to emulate coming from the request | 
 | 214 |   content: string, the response body | 
 | 215 |   postproc: callable, the post processing function usually supplied by | 
 | 216 |             the model class. See model.JsonModel.response() as an example. | 
 | 217 |  | 
 | 218 | </pre> | 
 | 219 |   <dl class="fields"> | 
 | 220 |     <dt>Overrides: | 
 | 221 |         object.__init__ | 
 | 222 |     </dt> | 
 | 223 |   </dl> | 
 | 224 | </td></tr></table> | 
 | 225 | </div> | 
 | 226 | <a name="execute"></a> | 
 | 227 | <div> | 
 | 228 | <table class="details" border="1" cellpadding="3" | 
 | 229 |        cellspacing="0" width="100%" bgcolor="white"> | 
 | 230 | <tr><td> | 
 | 231 |   <table width="100%" cellpadding="0" cellspacing="0" border="0"> | 
 | 232 |   <tr valign="top"><td> | 
 | 233 |   <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>, | 
 | 234 |         <span class="sig-arg">http</span>=<span class="sig-default">None</span>)</span> | 
 | 235 |   </h3> | 
 | 236 |   </td><td align="right" valign="top" | 
 | 237 |     ><span class="codelink"><a href="apiclient.http-pysrc.html#HttpRequestMock.execute">source code</a></span>  | 
 | 238 |     </td> | 
 | 239 |   </tr></table> | 
 | 240 |    | 
 | 241 |   <pre class="literalblock"> | 
 | 242 | Execute the request. | 
 | 243 |  | 
 | 244 | Same behavior as HttpRequest.execute(), but the response is | 
 | 245 | mocked and not really from an HTTP request/response. | 
 | 246 |  | 
 | 247 | </pre> | 
 | 248 |   <dl class="fields"> | 
 | 249 |   </dl> | 
 | 250 | </td></tr></table> | 
 | 251 | </div> | 
 | 252 | <br /> | 
 | 253 | <!-- ==================== NAVIGATION BAR ==================== --> | 
 | 254 | <table class="navbar" border="0" width="100%" cellpadding="0" | 
 | 255 |        bgcolor="#a0c0ff" cellspacing="0"> | 
 | 256 |   <tr valign="middle"> | 
 | 257 |  | 
 | 258 |   <!-- Tree link --> | 
 | 259 |       <th>   <a | 
 | 260 |         href="module-tree.html">Trees</a>   </th> | 
 | 261 |  | 
 | 262 |   <!-- Index link --> | 
 | 263 |       <th>   <a | 
 | 264 |         href="identifier-index.html">Indices</a>   </th> | 
 | 265 |  | 
 | 266 |   <!-- Help link --> | 
 | 267 |       <th>   <a | 
 | 268 |         href="help.html">Help</a>   </th> | 
 | 269 |  | 
 | 270 |       <th class="navbar" width="100%"></th> | 
 | 271 |   </tr> | 
 | 272 | </table> | 
 | 273 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> | 
 | 274 |   <tr> | 
 | 275 |     <td align="left" class="footer"> | 
| Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame^] | 276 |     Generated by Epydoc 3.0.1 on Tue Aug  6 12:16:43 2013 | 
| Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 277 |     </td> | 
 | 278 |     <td align="right" class="footer"> | 
 | 279 |       <a target="mainFrame" href="http://epydoc.sourceforge.net" | 
 | 280 |         >http://epydoc.sourceforge.net</a> | 
 | 281 |     </td> | 
 | 282 |   </tr> | 
 | 283 | </table> | 
 | 284 |  | 
 | 285 | <script type="text/javascript"> | 
 | 286 |   <!-- | 
 | 287 |   // Private objects are initially displayed (because if | 
 | 288 |   // javascript is turned off then we want them to be | 
 | 289 |   // visible); but by default, we want to hide them.  So hide | 
 | 290 |   // them unless we have a cookie that says to show them. | 
 | 291 |   checkCookie(); | 
 | 292 |   // --> | 
 | 293 | </script> | 
 | 294 | </body> | 
 | 295 | </html> |