This file is indexed.

/usr/share/doc/python-gabbi-doc/html/gabbi.html is in python-gabbi-doc 1.40.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>gabbi Package &#8212; Gabbi  documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="_static/theme_override.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="prev" title="Frequently Asked Questions" href="faq.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="faq.html" title="Frequently Asked Questions"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Gabbi  documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="gabbi-package">
<h1>gabbi Package<a class="headerlink" href="#gabbi-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-gabbi.case">
<span id="case-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">case</span></code> Module<a class="headerlink" href="#module-gabbi.case" title="Permalink to this headline"></a></h2>
<p>A single HTTP request represented as a subclass of <code class="docutils literal"><span class="pre">testtools.TestCase</span></code></p>
<p>The test case encapsulates the request headers and body and expected
response headers and body. When the test is run an HTTP request is
made using urllib3. Assertions are made against the response.</p>
<dl class="class">
<dt id="gabbi.case.HTTPTestCase">
<em class="property">class </em><code class="descclassname">gabbi.case.</code><code class="descname">HTTPTestCase</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">testtools.testcase.TestCase</span></code></p>
<p>Encapsulate a single HTTP request as a TestCase.</p>
<p>If the test is a member of a sequence of requests, ensure that prior
tests are run.</p>
<p>To keep the test harness happy we need to make sure the setUp and
tearDown are only run once.</p>
<dl class="method">
<dt id="gabbi.case.HTTPTestCase.assert_in_or_print_output">
<code class="descname">assert_in_or_print_output</code><span class="sig-paren">(</span><em>expected</em>, <em>iterable</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase.assert_in_or_print_output" title="Permalink to this definition"></a></dt>
<dd><p>Assert the iterable contains expected or print some output.</p>
<p>If the output is long, it is limited by either GABBI_MAX_CHARS_OUTPUT
in the environment or the MAX_CHARS_OUTPUT constant.</p>
</dd></dl>

<dl class="attribute">
<dt id="gabbi.case.HTTPTestCase.base_test">
<code class="descname">base_test</code><em class="property"> = {'data': '', 'desc': '', 'method': 'GET', 'name': '', 'poll': {}, 'query_parameters': {}, 'redirects': False, 'request_headers': {}, 'skip': '', 'ssl': False, 'status': '200', 'url': '', 'use_prior_test': True, 'verbose': False, 'xfail': False}</em><a class="headerlink" href="#gabbi.case.HTTPTestCase.base_test" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="gabbi.case.HTTPTestCase.get_content_handler">
<code class="descname">get_content_handler</code><span class="sig-paren">(</span><em>content_type</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase.get_content_handler" title="Permalink to this definition"></a></dt>
<dd><p>Determine the content handler for this media type.</p>
</dd></dl>

<dl class="method">
<dt id="gabbi.case.HTTPTestCase.load_data_file">
<code class="descname">load_data_file</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase.load_data_file" title="Permalink to this definition"></a></dt>
<dd><p>Read a file from the current test directory.</p>
</dd></dl>

<dl class="method">
<dt id="gabbi.case.HTTPTestCase.replace_template">
<code class="descname">replace_template</code><span class="sig-paren">(</span><em>message</em>, <em>escape_regex=False</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase.replace_template" title="Permalink to this definition"></a></dt>
<dd><p>Replace magic strings in message.</p>
</dd></dl>

<dl class="method">
<dt id="gabbi.case.HTTPTestCase.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>result=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase.run" title="Permalink to this definition"></a></dt>
<dd><p>Store the current result handler on this test.</p>
</dd></dl>

<dl class="method">
<dt id="gabbi.case.HTTPTestCase.setUp">
<code class="descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase.setUp" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="gabbi.case.HTTPTestCase.tearDown">
<code class="descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase.tearDown" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="gabbi.case.HTTPTestCase.test_request">
<code class="descname">test_request</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.HTTPTestCase.test_request" title="Permalink to this definition"></a></dt>
<dd><p>Run this request if it has not yet run.</p>
<p>If there is a prior test in the sequence, run it first.</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="gabbi.case.potentialFailure">
<code class="descclassname">gabbi.case.</code><code class="descname">potentialFailure</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.case.potentialFailure" title="Permalink to this definition"></a></dt>
<dd><p>Decorate a test method that is expected to fail if ‘xfail’ is true.</p>
</dd></dl>

</div>
<div class="section" id="driver-module">
<h2><code class="xref py py-mod docutils literal"><span class="pre">driver</span></code> Module<a class="headerlink" href="#driver-module" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-gabbi.suitemaker">
<span id="suitemaker-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">suitemaker</span></code> Module<a class="headerlink" href="#module-gabbi.suitemaker" title="Permalink to this headline"></a></h2>
<p>The code that creates a suite of tests.</p>
<p>The key piece of code is <a class="reference internal" href="#gabbi.suitemaker.test_suite_from_dict" title="gabbi.suitemaker.test_suite_from_dict"><code class="xref py py-meth docutils literal"><span class="pre">test_suite_from_dict()</span></code></a>. It produces a
<a class="reference internal" href="#gabbi.suite.GabbiSuite" title="gabbi.suite.GabbiSuite"><code class="xref py py-class docutils literal"><span class="pre">gabbi.suite.GabbiSuite</span></code></a> containing one or more
<a class="reference internal" href="#gabbi.case.HTTPTestCase" title="gabbi.case.HTTPTestCase"><code class="xref py py-class docutils literal"><span class="pre">gabbi.case.HTTPTestCase</span></code></a>.</p>
<dl class="class">
<dt id="gabbi.suitemaker.TestBuilder">
<em class="property">class </em><code class="descclassname">gabbi.suitemaker.</code><code class="descname">TestBuilder</code><a class="headerlink" href="#gabbi.suitemaker.TestBuilder" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">type</span></code></p>
<p>Metaclass to munge a dynamically created test.</p>
<dl class="attribute">
<dt id="gabbi.suitemaker.TestBuilder.required_attributes">
<code class="descname">required_attributes</code><em class="property"> = {'has_run': False}</em><a class="headerlink" href="#gabbi.suitemaker.TestBuilder.required_attributes" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="gabbi.suitemaker.TestMaker">
<em class="property">class </em><code class="descclassname">gabbi.suitemaker.</code><code class="descname">TestMaker</code><span class="sig-paren">(</span><em>test_base_name</em>, <em>test_defaults</em>, <em>test_directory</em>, <em>fixture_classes</em>, <em>loader</em>, <em>host</em>, <em>port</em>, <em>intercept</em>, <em>prefix</em>, <em>response_handlers</em>, <em>content_handlers</em>, <em>test_loader_name=None</em>, <em>inner_fixtures=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suitemaker.TestMaker" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>A class for encapsulating test invariants.</p>
<p>All of the tests in a single gabbi file have invariants which are
provided when creating each HTTPTestCase. It is not useful
to pass these around when making each test case. So they are
wrapped in this class which then has make_one_test called multiple
times to generate all the tests in the suite.</p>
<dl class="method">
<dt id="gabbi.suitemaker.TestMaker.make_one_test">
<code class="descname">make_one_test</code><span class="sig-paren">(</span><em>test_dict</em>, <em>prior_test</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suitemaker.TestMaker.make_one_test" title="Permalink to this definition"></a></dt>
<dd><p>Create one single HTTPTestCase.</p>
<p>The returned HTTPTestCase is added to the TestSuite currently
being built (one per YAML file).</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="gabbi.suitemaker.test_suite_from_dict">
<code class="descclassname">gabbi.suitemaker.</code><code class="descname">test_suite_from_dict</code><span class="sig-paren">(</span><em>loader</em>, <em>test_base_name</em>, <em>suite_dict</em>, <em>test_directory</em>, <em>host</em>, <em>port</em>, <em>fixture_module</em>, <em>intercept</em>, <em>prefix=''</em>, <em>handlers=None</em>, <em>test_loader_name=None</em>, <em>inner_fixtures=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suitemaker.test_suite_from_dict" title="Permalink to this definition"></a></dt>
<dd><p>Generate a GabbiSuite from a dict represent a list of tests.</p>
<p>The dict takes the form:</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>fixtures</strong> – An optional list of fixture classes that this suite
can use.</li>
<li><strong>defaults</strong> – An optional dictionary of default values to be used
in each test.</li>
<li><strong>tests</strong> – A list of individual tests, themselves each being a
dictionary. See <code class="xref py py-data docutils literal"><span class="pre">gabbi.case.BASE_TEST</span></code>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="gabbi.suitemaker.test_update">
<code class="descclassname">gabbi.suitemaker.</code><code class="descname">test_update</code><span class="sig-paren">(</span><em>orig_dict</em>, <em>new_dict</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suitemaker.test_update" title="Permalink to this definition"></a></dt>
<dd><p>Modify test in place to update with new data.</p>
</dd></dl>

</div>
<div class="section" id="module-gabbi.fixture">
<span id="fixture-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">fixture</span></code> Module<a class="headerlink" href="#module-gabbi.fixture" title="Permalink to this headline"></a></h2>
<p>Manage fixtures for gabbi at the test suite level.</p>
<dl class="class">
<dt id="gabbi.fixture.GabbiFixture">
<em class="property">class </em><code class="descclassname">gabbi.fixture.</code><code class="descname">GabbiFixture</code><a class="headerlink" href="#gabbi.fixture.GabbiFixture" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>A context manager that operates as a fixture.</p>
<p>Subclasses must implement <code class="docutils literal"><span class="pre">start_fixture</span></code> and <code class="docutils literal"><span class="pre">stop_fixture</span></code>, each
of which contain the logic for stopping and starting whatever the
fixture is. What a fixture is is left as an exercise for the implementor.</p>
<p>These context managers will be nested so any actual work needs to
happen in <code class="docutils literal"><span class="pre">start_fixture</span></code> and <code class="docutils literal"><span class="pre">stop_fixture</span></code> and not in <code class="docutils literal"><span class="pre">__init__</span></code>.
Otherwise exception handling will not work properly.</p>
<dl class="method">
<dt id="gabbi.fixture.GabbiFixture.start_fixture">
<code class="descname">start_fixture</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.fixture.GabbiFixture.start_fixture" title="Permalink to this definition"></a></dt>
<dd><p>Implement the actual workings of starting the fixture here.</p>
</dd></dl>

<dl class="method">
<dt id="gabbi.fixture.GabbiFixture.stop_fixture">
<code class="descname">stop_fixture</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.fixture.GabbiFixture.stop_fixture" title="Permalink to this definition"></a></dt>
<dd><p>Implement the actual workings of stopping the fixture here.</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="gabbi.fixture.GabbiFixtureError">
<em class="property">exception </em><code class="descclassname">gabbi.fixture.</code><code class="descname">GabbiFixtureError</code><a class="headerlink" href="#gabbi.fixture.GabbiFixtureError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></p>
<p>Generic exception for GabbiFixture.</p>
</dd></dl>

<dl class="class">
<dt id="gabbi.fixture.SkipAllFixture">
<em class="property">class </em><code class="descclassname">gabbi.fixture.</code><code class="descname">SkipAllFixture</code><a class="headerlink" href="#gabbi.fixture.SkipAllFixture" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#gabbi.fixture.GabbiFixture" title="gabbi.fixture.GabbiFixture"><code class="xref py py-class docutils literal"><span class="pre">gabbi.fixture.GabbiFixture</span></code></a></p>
<p>A fixture that skips all the tests in the current suite.</p>
<dl class="method">
<dt id="gabbi.fixture.SkipAllFixture.start_fixture">
<code class="descname">start_fixture</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.fixture.SkipAllFixture.start_fixture" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="gabbi.fixture.nest">
<code class="descclassname">gabbi.fixture.</code><code class="descname">nest</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwds</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.fixture.nest" title="Permalink to this definition"></a></dt>
<dd><p>Nest a series of fixtures.</p>
<p>This is duplicated from <code class="docutils literal"><span class="pre">nested</span></code> in the stdlib, which has been
deprecated because of issues with how exceptions are difficult to
handle during <code class="docutils literal"><span class="pre">__init__</span></code>. Gabbi needs to nest an unknown number
of fixtures dynamically, so the <code class="docutils literal"><span class="pre">with</span></code> syntax that replaces
<code class="docutils literal"><span class="pre">nested</span></code> will not work.</p>
</dd></dl>

</div>
<div class="section" id="module-gabbi.handlers">
<span id="handlers-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">handlers</span></code> Module<a class="headerlink" href="#module-gabbi.handlers" title="Permalink to this headline"></a></h2>
<p>Package for response and content handlers that process the body of
a response in various ways.</p>
<div class="section" id="module-gabbi.handlers.base">
<span id="handlers-base-module"></span><h3><code class="xref py py-mod docutils literal"><span class="pre">handlers.base</span></code> Module<a class="headerlink" href="#module-gabbi.handlers.base" title="Permalink to this headline"></a></h3>
<p>Base classes for response and content handlers.</p>
<dl class="class">
<dt id="gabbi.handlers.base.ContentHandler">
<em class="property">class </em><code class="descclassname">gabbi.handlers.base.</code><code class="descname">ContentHandler</code><a class="headerlink" href="#gabbi.handlers.base.ContentHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#gabbi.handlers.base.ResponseHandler" title="gabbi.handlers.base.ResponseHandler"><code class="xref py py-class docutils literal"><span class="pre">gabbi.handlers.base.ResponseHandler</span></code></a></p>
<p>A subclass of ResponseHandlers that adds content handling.</p>
<dl class="staticmethod">
<dt id="gabbi.handlers.base.ContentHandler.accepts">
<em class="property">static </em><code class="descname">accepts</code><span class="sig-paren">(</span><em>content_type</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.base.ContentHandler.accepts" title="Permalink to this definition"></a></dt>
<dd><p>Return True if this handler can handler this type.</p>
</dd></dl>

<dl class="staticmethod">
<dt id="gabbi.handlers.base.ContentHandler.dumps">
<em class="property">static </em><code class="descname">dumps</code><span class="sig-paren">(</span><em>data</em>, <em>pretty=False</em>, <em>test=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.base.ContentHandler.dumps" title="Permalink to this definition"></a></dt>
<dd><p>Return structured data as a string.</p>
<p>If pretty is true, prettify.</p>
</dd></dl>

<dl class="staticmethod">
<dt id="gabbi.handlers.base.ContentHandler.loads">
<em class="property">static </em><code class="descname">loads</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.base.ContentHandler.loads" title="Permalink to this definition"></a></dt>
<dd><p>Create structured (Python) data from a stream.</p>
</dd></dl>

<dl class="classmethod">
<dt id="gabbi.handlers.base.ContentHandler.replacer">
<em class="property">classmethod </em><code class="descname">replacer</code><span class="sig-paren">(</span><em>response_data</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.base.ContentHandler.replacer" title="Permalink to this definition"></a></dt>
<dd><p>Return the string that is replacing RESPONSE.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="gabbi.handlers.base.ResponseHandler">
<em class="property">class </em><code class="descclassname">gabbi.handlers.base.</code><code class="descname">ResponseHandler</code><a class="headerlink" href="#gabbi.handlers.base.ResponseHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Add functionality for making assertions about an HTTP response.</p>
<p>A subclass may implement two methods: <code class="docutils literal"><span class="pre">action</span></code> and <code class="docutils literal"><span class="pre">preprocess</span></code>.</p>
<p><code class="docutils literal"><span class="pre">preprocess</span></code> takes one argument, the <code class="docutils literal"><span class="pre">TestCase</span></code>. It is called exactly
once for each test before looping across the assertions. It is used,
rarely, to copy the <code class="docutils literal"><span class="pre">test.output</span></code> into a useful form (such as a parsed
DOM).</p>
<p><code class="docutils literal"><span class="pre">action</span></code> takes two or three arguments. If <code class="docutils literal"><span class="pre">test_key_value</span></code> is a list
<code class="docutils literal"><span class="pre">action</span></code> is called with the test case and a single list item. If
<code class="docutils literal"><span class="pre">test_key_value</span></code> is a dict then <code class="docutils literal"><span class="pre">action</span></code> is called with the test case
and a key and value pair.</p>
<dl class="method">
<dt id="gabbi.handlers.base.ResponseHandler.action">
<code class="descname">action</code><span class="sig-paren">(</span><em>test</em>, <em>item</em>, <em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.base.ResponseHandler.action" title="Permalink to this definition"></a></dt>
<dd><p>Test an individual entry for this response handler.</p>
<p>If the entry is a key value pair the key is in item and the
value in value. Otherwise the entry is considered a single item
from a list.</p>
</dd></dl>

<dl class="method">
<dt id="gabbi.handlers.base.ResponseHandler.preprocess">
<code class="descname">preprocess</code><span class="sig-paren">(</span><em>test</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.base.ResponseHandler.preprocess" title="Permalink to this definition"></a></dt>
<dd><p>Do any pre-single-test preprocessing.</p>
</dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.base.ResponseHandler.test_key_suffix">
<code class="descname">test_key_suffix</code><em class="property"> = ''</em><a class="headerlink" href="#gabbi.handlers.base.ResponseHandler.test_key_suffix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.base.ResponseHandler.test_key_value">
<code class="descname">test_key_value</code><em class="property"> = []</em><a class="headerlink" href="#gabbi.handlers.base.ResponseHandler.test_key_value" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-gabbi.handlers.core">
<span id="handlers-core-module"></span><h3><code class="xref py py-mod docutils literal"><span class="pre">handlers.core</span></code> Module<a class="headerlink" href="#module-gabbi.handlers.core" title="Permalink to this headline"></a></h3>
<p>Core response handlers.</p>
<dl class="class">
<dt id="gabbi.handlers.core.ForbiddenHeadersResponseHandler">
<em class="property">class </em><code class="descclassname">gabbi.handlers.core.</code><code class="descname">ForbiddenHeadersResponseHandler</code><a class="headerlink" href="#gabbi.handlers.core.ForbiddenHeadersResponseHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#gabbi.handlers.base.ResponseHandler" title="gabbi.handlers.base.ResponseHandler"><code class="xref py py-class docutils literal"><span class="pre">gabbi.handlers.base.ResponseHandler</span></code></a></p>
<p>Test that listed headers are not in the response.</p>
<dl class="method">
<dt id="gabbi.handlers.core.ForbiddenHeadersResponseHandler.action">
<code class="descname">action</code><span class="sig-paren">(</span><em>test</em>, <em>forbidden</em>, <em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.core.ForbiddenHeadersResponseHandler.action" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.core.ForbiddenHeadersResponseHandler.test_key_suffix">
<code class="descname">test_key_suffix</code><em class="property"> = 'forbidden_headers'</em><a class="headerlink" href="#gabbi.handlers.core.ForbiddenHeadersResponseHandler.test_key_suffix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.core.ForbiddenHeadersResponseHandler.test_key_value">
<code class="descname">test_key_value</code><em class="property"> = []</em><a class="headerlink" href="#gabbi.handlers.core.ForbiddenHeadersResponseHandler.test_key_value" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="gabbi.handlers.core.HeadersResponseHandler">
<em class="property">class </em><code class="descclassname">gabbi.handlers.core.</code><code class="descname">HeadersResponseHandler</code><a class="headerlink" href="#gabbi.handlers.core.HeadersResponseHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#gabbi.handlers.base.ResponseHandler" title="gabbi.handlers.base.ResponseHandler"><code class="xref py py-class docutils literal"><span class="pre">gabbi.handlers.base.ResponseHandler</span></code></a></p>
<p>Compare expected headers with actual headers.</p>
<p>If a header value is wrapped in <code class="docutils literal"><span class="pre">/</span></code> it is treated as a raw
regular expression.</p>
<p>Headers values are always treated as strings.</p>
<dl class="method">
<dt id="gabbi.handlers.core.HeadersResponseHandler.action">
<code class="descname">action</code><span class="sig-paren">(</span><em>test</em>, <em>header</em>, <em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.core.HeadersResponseHandler.action" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.core.HeadersResponseHandler.test_key_suffix">
<code class="descname">test_key_suffix</code><em class="property"> = 'headers'</em><a class="headerlink" href="#gabbi.handlers.core.HeadersResponseHandler.test_key_suffix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.core.HeadersResponseHandler.test_key_value">
<code class="descname">test_key_value</code><em class="property"> = {}</em><a class="headerlink" href="#gabbi.handlers.core.HeadersResponseHandler.test_key_value" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="gabbi.handlers.core.StringResponseHandler">
<em class="property">class </em><code class="descclassname">gabbi.handlers.core.</code><code class="descname">StringResponseHandler</code><a class="headerlink" href="#gabbi.handlers.core.StringResponseHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#gabbi.handlers.base.ResponseHandler" title="gabbi.handlers.base.ResponseHandler"><code class="xref py py-class docutils literal"><span class="pre">gabbi.handlers.base.ResponseHandler</span></code></a></p>
<p>Test for matching strings in the the response body.</p>
<dl class="method">
<dt id="gabbi.handlers.core.StringResponseHandler.action">
<code class="descname">action</code><span class="sig-paren">(</span><em>test</em>, <em>expected</em>, <em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.core.StringResponseHandler.action" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.core.StringResponseHandler.test_key_suffix">
<code class="descname">test_key_suffix</code><em class="property"> = 'strings'</em><a class="headerlink" href="#gabbi.handlers.core.StringResponseHandler.test_key_suffix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.core.StringResponseHandler.test_key_value">
<code class="descname">test_key_value</code><em class="property"> = []</em><a class="headerlink" href="#gabbi.handlers.core.StringResponseHandler.test_key_value" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-gabbi.handlers.jsonhandler">
<span id="handlers-jsonhandler-module"></span><h3><code class="xref py py-mod docutils literal"><span class="pre">handlers.jsonhandler</span></code> Module<a class="headerlink" href="#module-gabbi.handlers.jsonhandler" title="Permalink to this headline"></a></h3>
<p>JSON-related content handling.</p>
<dl class="class">
<dt id="gabbi.handlers.jsonhandler.JSONHandler">
<em class="property">class </em><code class="descclassname">gabbi.handlers.jsonhandler.</code><code class="descname">JSONHandler</code><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#gabbi.handlers.base.ContentHandler" title="gabbi.handlers.base.ContentHandler"><code class="xref py py-class docutils literal"><span class="pre">gabbi.handlers.base.ContentHandler</span></code></a></p>
<p>A ContentHandler for JSON</p>
<ul class="simple">
<li>Structured test <code class="docutils literal"><span class="pre">data</span></code> is turned into JSON when request
content-type is JSON.</li>
<li>Response bodies that are JSON strings are made into Python
data on the test <code class="docutils literal"><span class="pre">response_data</span></code> attribute when the response
content-type is JSON.</li>
<li>A <code class="docutils literal"><span class="pre">response_json_paths</span></code> response handler is added.</li>
<li>JSONPaths in $RESPONSE substitutions are supported.</li>
</ul>
<dl class="staticmethod">
<dt id="gabbi.handlers.jsonhandler.JSONHandler.accepts">
<em class="property">static </em><code class="descname">accepts</code><span class="sig-paren">(</span><em>content_type</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler.accepts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="gabbi.handlers.jsonhandler.JSONHandler.action">
<code class="descname">action</code><span class="sig-paren">(</span><em>test</em>, <em>path</em>, <em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler.action" title="Permalink to this definition"></a></dt>
<dd><p>Test json_paths against json data.</p>
</dd></dl>

<dl class="staticmethod">
<dt id="gabbi.handlers.jsonhandler.JSONHandler.dumps">
<em class="property">static </em><code class="descname">dumps</code><span class="sig-paren">(</span><em>data</em>, <em>pretty=False</em>, <em>test=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler.dumps" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="gabbi.handlers.jsonhandler.JSONHandler.extract_json_path_value">
<em class="property">static </em><code class="descname">extract_json_path_value</code><span class="sig-paren">(</span><em>data</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler.extract_json_path_value" title="Permalink to this definition"></a></dt>
<dd><p>Extract the value at JSON Path path from the data.</p>
<p>The input data is a Python datastructure, not a JSON string.</p>
</dd></dl>

<dl class="staticmethod">
<dt id="gabbi.handlers.jsonhandler.JSONHandler.loads">
<em class="property">static </em><code class="descname">loads</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler.loads" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="gabbi.handlers.jsonhandler.JSONHandler.replacer">
<em class="property">classmethod </em><code class="descname">replacer</code><span class="sig-paren">(</span><em>response_data</em>, <em>match</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler.replacer" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.jsonhandler.JSONHandler.test_key_suffix">
<code class="descname">test_key_suffix</code><em class="property"> = 'json_paths'</em><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler.test_key_suffix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.handlers.jsonhandler.JSONHandler.test_key_value">
<code class="descname">test_key_value</code><em class="property"> = {}</em><a class="headerlink" href="#gabbi.handlers.jsonhandler.JSONHandler.test_key_value" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

</div>
</div>
<div class="section" id="module-gabbi.suite">
<span id="suite-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">suite</span></code> Module<a class="headerlink" href="#module-gabbi.suite" title="Permalink to this headline"></a></h2>
<p>A TestSuite for containing gabbi tests.</p>
<p>This suite has two features: the contained tests are ordered and there
are suite-level fixtures that operate as context managers.</p>
<dl class="class">
<dt id="gabbi.suite.GabbiSuite">
<em class="property">class </em><code class="descclassname">gabbi.suite.</code><code class="descname">GabbiSuite</code><span class="sig-paren">(</span><em>tests=()</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suite.GabbiSuite" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">unittest.suite.TestSuite</span></code></p>
<p>A TestSuite with fixtures.</p>
<p>The suite wraps the tests with a set of nested context managers that
operate as fixtures.</p>
<p>If a fixture raises unittest.case.SkipTest during setup, all the
tests in this suite will be skipped.</p>
<dl class="method">
<dt id="gabbi.suite.GabbiSuite.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>result</em>, <em>debug=False</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suite.GabbiSuite.run" title="Permalink to this definition"></a></dt>
<dd><p>Override TestSuite run to start suite-level fixtures.</p>
<p>To avoid exception confusion, use a null Fixture when there
are no fixtures.</p>
</dd></dl>

<dl class="method">
<dt id="gabbi.suite.GabbiSuite.start">
<code class="descname">start</code><span class="sig-paren">(</span><em>result</em>, <em>tests</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suite.GabbiSuite.start" title="Permalink to this definition"></a></dt>
<dd><p>Start fixtures when using pytest.</p>
</dd></dl>

<dl class="method">
<dt id="gabbi.suite.GabbiSuite.stop">
<code class="descname">stop</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suite.GabbiSuite.stop" title="Permalink to this definition"></a></dt>
<dd><p>Stop fixtures when using pytest.</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="gabbi.suite.noop">
<code class="descclassname">gabbi.suite.</code><code class="descname">noop</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.suite.noop" title="Permalink to this definition"></a></dt>
<dd><p>A noop method used to disable collected tests.</p>
</dd></dl>

</div>
<div class="section" id="runner-module">
<h2><code class="xref py py-mod docutils literal"><span class="pre">runner</span></code> Module<a class="headerlink" href="#runner-module" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="reporter-module">
<h2><code class="xref py py-mod docutils literal"><span class="pre">reporter</span></code> Module<a class="headerlink" href="#reporter-module" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-gabbi.utils">
<span id="utils-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">utils</span></code> Module<a class="headerlink" href="#module-gabbi.utils" title="Permalink to this headline"></a></h2>
<p>Utility functions grab bag.</p>
<dl class="function">
<dt id="gabbi.utils.create_url">
<code class="descclassname">gabbi.utils.</code><code class="descname">create_url</code><span class="sig-paren">(</span><em>base_url</em>, <em>host</em>, <em>port=None</em>, <em>prefix=''</em>, <em>ssl=False</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.utils.create_url" title="Permalink to this definition"></a></dt>
<dd><p>Given pieces of a path-based url, return a fully qualified url.</p>
</dd></dl>

<dl class="function">
<dt id="gabbi.utils.decode_response_content">
<code class="descclassname">gabbi.utils.</code><code class="descname">decode_response_content</code><span class="sig-paren">(</span><em>header_dict</em>, <em>content</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.utils.decode_response_content" title="Permalink to this definition"></a></dt>
<dd><p>Decode content to a proper string.</p>
</dd></dl>

<dl class="function">
<dt id="gabbi.utils.extract_content_type">
<code class="descclassname">gabbi.utils.</code><code class="descname">extract_content_type</code><span class="sig-paren">(</span><em>header_dict</em>, <em>default='application/binary'</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.utils.extract_content_type" title="Permalink to this definition"></a></dt>
<dd><p>Extract parsed content-type from headers.</p>
</dd></dl>

<dl class="function">
<dt id="gabbi.utils.get_colorizer">
<code class="descclassname">gabbi.utils.</code><code class="descname">get_colorizer</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.utils.get_colorizer" title="Permalink to this definition"></a></dt>
<dd><p>Return a function to colorize a string.</p>
<p>Only if stream is a tty .</p>
</dd></dl>

<dl class="function">
<dt id="gabbi.utils.host_info_from_target">
<code class="descclassname">gabbi.utils.</code><code class="descname">host_info_from_target</code><span class="sig-paren">(</span><em>target</em>, <em>prefix=None</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.utils.host_info_from_target" title="Permalink to this definition"></a></dt>
<dd><p>Turn url or host:port and target into test destination.</p>
</dd></dl>

<dl class="function">
<dt id="gabbi.utils.load_yaml">
<code class="descclassname">gabbi.utils.</code><code class="descname">load_yaml</code><span class="sig-paren">(</span><em>handle=None</em>, <em>yaml_file=None</em>, <em>safe=True</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.utils.load_yaml" title="Permalink to this definition"></a></dt>
<dd><p>Read and parse any YAML file or filehandle.</p>
<p>Let exceptions flow where they may.</p>
<p>If no file or handle is provided, read from STDIN.</p>
</dd></dl>

<dl class="function">
<dt id="gabbi.utils.not_binary">
<code class="descclassname">gabbi.utils.</code><code class="descname">not_binary</code><span class="sig-paren">(</span><em>content_type</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.utils.not_binary" title="Permalink to this definition"></a></dt>
<dd><p>Decide if something is content we’d like to treat as a string.</p>
</dd></dl>

<dl class="function">
<dt id="gabbi.utils.parse_content_type">
<code class="descclassname">gabbi.utils.</code><code class="descname">parse_content_type</code><span class="sig-paren">(</span><em>content_type</em>, <em>default_charset='utf-8'</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.utils.parse_content_type" title="Permalink to this definition"></a></dt>
<dd><p>Parse content type value for media type and charset.</p>
</dd></dl>

</div>
<div class="section" id="module-gabbi.exception">
<span id="exception-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">exception</span></code> Module<a class="headerlink" href="#module-gabbi.exception" title="Permalink to this headline"></a></h2>
<p>Gabbi specific exceptions.</p>
<dl class="exception">
<dt id="gabbi.exception.GabbiFormatError">
<em class="property">exception </em><code class="descclassname">gabbi.exception.</code><code class="descname">GabbiFormatError</code><a class="headerlink" href="#gabbi.exception.GabbiFormatError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.ValueError</span></code></p>
<p>An exception to encapsulate poorly formed test data.</p>
</dd></dl>

<dl class="exception">
<dt id="gabbi.exception.GabbiSyntaxWarning">
<em class="property">exception </em><code class="descclassname">gabbi.exception.</code><code class="descname">GabbiSyntaxWarning</code><a class="headerlink" href="#gabbi.exception.GabbiSyntaxWarning" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">exceptions.SyntaxWarning</span></code></p>
<p>A warning about syntax that is not desirable.</p>
</dd></dl>

</div>
<div class="section" id="module-gabbi.httpclient">
<span id="httpclient-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">httpclient</span></code> Module<a class="headerlink" href="#module-gabbi.httpclient" title="Permalink to this headline"></a></h2>
<p>Subclass of Http class for verbosity.</p>
<dl class="class">
<dt id="gabbi.httpclient.Http">
<em class="property">class </em><code class="descclassname">gabbi.httpclient.</code><code class="descname">Http</code><span class="sig-paren">(</span><em>num_pools=10</em>, <em>headers=None</em>, <em>**connection_pool_kw</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.httpclient.Http" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">urllib3.poolmanager.PoolManager</span></code></p>
<p>A subclass of the urllib3.PoolManager to munge the data.</p>
<p>This transforms the response to look more like what httplib2
provided when it was used as the httpclient.</p>
<dl class="method">
<dt id="gabbi.httpclient.Http.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>absolute_uri</em>, <em>method</em>, <em>body</em>, <em>headers</em>, <em>redirect</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.httpclient.Http.request" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="gabbi.httpclient.VerboseHttp">
<em class="property">class </em><code class="descclassname">gabbi.httpclient.</code><code class="descname">VerboseHttp</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.httpclient.VerboseHttp" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#gabbi.httpclient.Http" title="gabbi.httpclient.Http"><code class="xref py py-class docutils literal"><span class="pre">gabbi.httpclient.Http</span></code></a></p>
<p>A subclass of Http that verbosely reports on activity.</p>
<p>If the output is a tty or <code class="docutils literal"><span class="pre">GABBI_FORCE_COLOR</span></code> is set in the
environment, then output will be colorized according to <code class="docutils literal"><span class="pre">COLORMAP</span></code>.</p>
<p>Output can include request and response headers, request and
response body content (if of a printable content-type), or both.</p>
<p>The color of the output has reasonable defaults. These may be overridden
by setting the following environment variables</p>
<ul class="simple">
<li>GABBI_CAPTION_COLOR</li>
<li>GABBI_HEADER_COLOR</li>
<li>GABBI_REQUEST_COLOR</li>
<li>GABBI_STATUS_COLOR</li>
</ul>
<p>to any of: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE</p>
<dl class="attribute">
<dt id="gabbi.httpclient.VerboseHttp.COLORMAP">
<code class="descname">COLORMAP</code><em class="property"> = {'caption': 'BLUE', 'header': 'YELLOW', 'request': 'CYAN', 'status': 'CYAN'}</em><a class="headerlink" href="#gabbi.httpclient.VerboseHttp.COLORMAP" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.httpclient.VerboseHttp.HEADER_BLACKLIST">
<code class="descname">HEADER_BLACKLIST</code><em class="property"> = ['status', 'reason']</em><a class="headerlink" href="#gabbi.httpclient.VerboseHttp.HEADER_BLACKLIST" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.httpclient.VerboseHttp.REQUEST_PREFIX">
<code class="descname">REQUEST_PREFIX</code><em class="property"> = '&gt;'</em><a class="headerlink" href="#gabbi.httpclient.VerboseHttp.REQUEST_PREFIX" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="gabbi.httpclient.VerboseHttp.RESPONSE_PREFIX">
<code class="descname">RESPONSE_PREFIX</code><em class="property"> = '&lt;'</em><a class="headerlink" href="#gabbi.httpclient.VerboseHttp.RESPONSE_PREFIX" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="gabbi.httpclient.VerboseHttp.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>absolute_uri</em>, <em>method</em>, <em>body</em>, <em>headers</em>, <em>redirect</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.httpclient.VerboseHttp.request" title="Permalink to this definition"></a></dt>
<dd><p>Display request parameters before requesting.</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="gabbi.httpclient.get_http">
<code class="descclassname">gabbi.httpclient.</code><code class="descname">get_http</code><span class="sig-paren">(</span><em>verbose=False</em>, <em>caption=''</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.httpclient.get_http" title="Permalink to this definition"></a></dt>
<dd><p>Return an Http class for making requests.</p>
</dd></dl>

</div>
<div class="section" id="module-gabbi.json_parser">
<span id="json-parser-module"></span><h2><code class="xref py py-mod docutils literal"><span class="pre">json_parser</span></code> Module<a class="headerlink" href="#module-gabbi.json_parser" title="Permalink to this headline"></a></h2>
<p>Keep one single global jsonpath parser.</p>
<dl class="function">
<dt id="gabbi.json_parser.parse">
<code class="descclassname">gabbi.json_parser.</code><code class="descname">parse</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#gabbi.json_parser.parse" title="Permalink to this definition"></a></dt>
<dd><p>Parse a JSONPath expression use the global parser.</p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">gabbi Package</a><ul>
<li><a class="reference internal" href="#module-gabbi.case"><code class="docutils literal"><span class="pre">case</span></code> Module</a></li>
<li><a class="reference internal" href="#driver-module"><code class="docutils literal"><span class="pre">driver</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.suitemaker"><code class="docutils literal"><span class="pre">suitemaker</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.fixture"><code class="docutils literal"><span class="pre">fixture</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.handlers"><code class="docutils literal"><span class="pre">handlers</span></code> Module</a><ul>
<li><a class="reference internal" href="#module-gabbi.handlers.base"><code class="docutils literal"><span class="pre">handlers.base</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.handlers.core"><code class="docutils literal"><span class="pre">handlers.core</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.handlers.jsonhandler"><code class="docutils literal"><span class="pre">handlers.jsonhandler</span></code> Module</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-gabbi.suite"><code class="docutils literal"><span class="pre">suite</span></code> Module</a></li>
<li><a class="reference internal" href="#runner-module"><code class="docutils literal"><span class="pre">runner</span></code> Module</a></li>
<li><a class="reference internal" href="#reporter-module"><code class="docutils literal"><span class="pre">reporter</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.utils"><code class="docutils literal"><span class="pre">utils</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.exception"><code class="docutils literal"><span class="pre">exception</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.httpclient"><code class="docutils literal"><span class="pre">httpclient</span></code> Module</a></li>
<li><a class="reference internal" href="#module-gabbi.json_parser"><code class="docutils literal"><span class="pre">json_parser</span></code> Module</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="faq.html"
                        title="previous chapter">Frequently Asked Questions</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/gabbi.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="faq.html" title="Frequently Asked Questions"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Gabbi  documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.7.
    </div>
  </body>
</html>