76 Commits

Author SHA1 Message Date
Chris Dent
748eac9d8a Add docs about the pytest situation
This may not be fully adequate but is a reasonable start. The main
point was to indicate the different loader method and the need
to yield the generated tests.
2016-04-06 14:20:30 +01:00
Chris Dent
60719215b8 Support testing of full json responses
This feature was effectively already there but not fleshed out in
tests nor documentation. Now there are some tests and a short
piece of documentation with a light warning about avoiding overuse.

A slight adjustment was required in data handling to deal with
empty lists and empty objects.

Fixes #113
2016-03-16 17:32:59 +00:00
FND
26daaae3ef Fix JSON formatting in docs
to avoid controversial idiosyncrasies
2016-03-11 21:39:41 +01:00
FND
56081d354a Simplify and clarify JSONPath docs
seems more concise and easier to digest this way
2016-03-11 21:38:41 +01:00
FND
20be204512 Improve internal reference in docs 2016-03-11 21:09:11 +01:00
Chris Dent
26132c0fb5 Fix punctuation problem in jsonpath docs
Because everyone is their own worst editor.
2016-03-11 19:29:53 +00:00
Chris Dent
ded89e8b43 Adjust jsonpath documentation
To be more clear about the sort, len and filter features.
2016-03-11 19:24:36 +00:00
Chris Dent
088b4cd71f Add small amount of docs for json extensions
These could probably be better but need to use it a bit to clear
on how to document it.
2016-03-05 15:17:00 +00:00
FND
e73050f2b3 Fix typo 2016-02-18 16:33:24 +01:00
FND
ffedc8b1e4 Switch to mdash where appropriate
not asserting comprehensive coverage though
2016-02-18 16:32:46 +01:00
Chris Dent
7a5b61c2d5 Add response_forbidden_headers handler
After much discussion this was determined to be the easiest and
cleanest way to accomplish a test which asserts "this header must
not be present". The ResponseHandler framework is used to good
effect to make short code.

The value of the response_forbidden_headers is a list of headers.
Case will be normalized to lower, which matches the internal
representation of the response headers dictionary.

Fixes #108
2015-12-09 18:11:53 +00:00
Chris Dent
bc11457101 Make table names headings for navigation ease
Fixes #57

This isn't great from a semantic standpoint but provides a better UX.
2015-11-03 06:37:01 +00:00
Chris Dent
db8c63b3e6 Move gabbiit tests into the tests dir
Originally there was no tests dir. When unit-like tests were added
they were put in a newly created tests directory. Since it is there
may as well use it.
2015-10-10 15:21:07 +01:00
FND
de5d869876 Tweak documentation markup to improve readability 2015-10-01 15:58:28 +02:00
FND
47baa650fa Replace func with meth references in docs
not exactly sure what this means, but @cdent suggests these should be
linked now
2015-10-01 15:18:17 +02:00
FND
4ac8d8e602 Document custom response handlers with gabbi-run 2015-10-01 14:47:32 +02:00
FND
b307a23110 Fix inconsistent font size within tables 2015-09-28 18:59:57 +02:00
Chris Dent
734ae9abab hack to override rtd back table formatting 2015-09-28 17:09:01 +01:00
Chris Dent
aa028c5bc1 hack to override rtd back table formatting 2015-09-28 17:06:56 +01:00
FND
4a8ff280ba Reorganize test format documentation
previously keys were documented as a lengthy list in seemingly arbitrary
order - in contrast, this structure promises to be more comprehensible
(and less daunting), plus table layout should improve readability and
scannability by providing some visual consistency

note that this inevitably led to various editorial changes
2015-09-28 17:49:41 +02:00
FND
4c1e1991c1 Add method shortcut documentation
I resisted adding a heading as that wouldn't fit into the existing
structure
2015-09-22 19:20:35 +02:00
FND
c8fd86638c Simplify phrasing 2015-09-03 16:56:49 +02:00
Chris Dent
1b46dcd3fc Allow the gabbi-run target to be a full URL
So instead of host[:port] [/prefix] it is also possible to do
http://host[:port][/prefix].

Docs updated accordingly.
2015-09-03 15:33:10 +01:00
Chris Dent
400c9ec3e4 Be explict about 'all' working with verbose flag. 2015-08-21 13:47:36 +01:00
Chris Dent
da9ff1e75e Add docs for verbose http client
Format is updated with a reference to the class docs, which
themselves explain the availalbe environment variables.
2015-08-21 13:44:58 +01:00
FND
7b4370e7ee Clarify query_parameters documentation 2015-08-07 16:45:39 +02:00
Chris Dent
ed0735b9a1 Add a bit more doc on query_parameters
This can always be improved later, based on feedback.
2015-08-06 10:47:30 +01:00
Chris Dent
063f00a7a6 Add query_parameters field
This adds a query_parameters field which can be used to add query
parameters to the url of the test in which it is used. It is a dict in
a form suitable for being passed to the urlencode() method.

This change is cumbersome because urlencoded in python2 and 3 have
different behaviors: In python2 a utf-8 encoded string is required.
In 3 it will figure out the right thing. So we here we just encode.

We also need to deal with the fact that a numeral in YAML will be
provided to Python as a numeric value and we need to stringify that in
a version independent fashion.
2015-08-06 10:41:40 +01:00
Chris Dent
b12a6a1672 Starts tests and docs on JSONPath len extension
I'm not entirely happy with the docs page, but decided something was
better than nothing.
2015-08-04 19:01:06 +01:00
Chris Dent
541eeb3662 Make sure all response content marked as JSON is decoded
Until this change only response bodies with a content-type of
'application/json' were decoded from JSON and stored in the
json_data attribute. Now '+json' style content-types also get the
same treatment.

json_data is the attribute later used when checking
response_json_paths. An expectation of a correct content type has
always been present but the docs have been update to make this
clear.

In the future when other content types will have handling similar to
JSON, this processing will need to be encapsulated in the
implementations of each content type handler. This fix is short
term.
2015-07-31 15:38:41 +01:00
Chris Dent
1f0b1f7542 Be ambiguous about copyright
The part that matters is the license not who or what holds it.
2015-07-20 13:57:05 +01:00
Chris Dent
4c76b5db35 Document availability of ' or " in replacers
Current text is a bit clunky but better than nothing.
2015-07-16 12:41:06 +01:00
Chris Dent
f2a32ad31b prep 1.1.0 release 2015-07-14 20:56:10 +01:00
Chris Dent
76c39194bc Introduction documentation improvements
The hope is that this makes gabbi-run a bit more visible
and points to the way tests can be loaded more clearly.

thanks to @FND for the prompting
2015-07-14 10:14:05 +01:00
Chris Dent
832b02ed59 Documentation improvements
Changes inspired by a recent read-through.
2015-07-07 09:39:02 +01:00
Chris Dent
ecd122b397 Fix typos in prefix feature docs 2015-06-17 12:16:24 +01:00
Chris Dent
702710be94 Add the concept of a 'prefix'
A prefix is applied to all the unqualifed URLs in a suite of tests.
This is useful for testing live applications that are mounted at
different points under a wsgi server.

Fixes #46
2015-06-17 12:05:32 +01:00
Chris Dent
e6eb54fe54 Add documentation for poll test key
This could be a good deal more verbose, but as is a useful start.
2015-06-12 10:34:36 +01:00
Chris Dent
91c568ba5f Merge branch 'master' of github.com:cdent/gabbi 2015-06-11 14:19:09 +01:00
Chris Dent
97b1ff2656 Special case "True" and "False" environment variables
The assumption is that when using those strings we actually want
booleans, additional there are a few BASE_TEST keys for which the
value is expected to be boolean and using an environment value
(which would always be a string if used directly) will not work (as
there is no way to indicate False).

Fixes #40
2015-06-11 14:16:20 +01:00
Kim Raymoure
ac3a33b293 Switching JSONPath formatting breadcrumb to jsonpath-rw for exactness 2015-06-10 12:04:31 -07:00
Kim Raymoure
5204a3f0dd JSONPath formatting breadcrumb in the docs 2015-06-10 10:58:31 -07:00
Jason Myers
771de69f42 Documentation Updates
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2015-06-08 08:39:21 -05:00
Chris Dent
c479f7402d Add links to gabbi-demo
From both the README and the front page of the docs.
2015-06-05 11:14:25 +01:00
Chris Dent
5319caa351 Expand the example test loader docs
This adds a few more examples, reformats for code blocks, and adds
links to real-world exampls.
2015-06-05 11:08:29 +01:00
Kim Raymoure
d43083ba35 Preliminary Getting Started suggestions for running the tests 2015-06-04 16:45:02 -07:00
Chris Dent
87876e79e7 docs typo 2015-06-01 16:12:05 +01:00
Chris Dent
5bf48292af Add support for informing stop_fixture of any exception
This makes it possible for stop_fixture to decide if it wants to
cleanup or not. For some exceptions it might not make sense.

To test this, non-gabbi tests now exist in gabbi/tests/ with the
dreaded introduction of mocks.
2015-05-26 22:45:38 +01:00
Chris Dent
5050b4de40 Add docs for verbose rule. 2015-04-28 11:42:38 +01:00
Chris Dent
16b778d808 Merge branch 'master' of github.com:cdent/gabbi
Conflicts:
	docs/source/index.rst
2015-04-22 12:12:19 +01:00