-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0 release #495
Labels
Comments
This was referenced Dec 9, 2019
Closed
Pytest 5 will also be supported |
Merged
Do you already have an idea when v1.0 will be available? :) |
Finally have access to a computer to get this done and in. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overdue by about 18 months, the version 1.0 of Tavern is coming out. This will
be a large collection of improvements (mainly internal) as well as some breaking changes.
All development as of the beginning of December 2019 will be done against the
feature/one-point-o
branch and the master branch will only receive bug fixes.The expected release date is January 2020 (possibly February as this is quite a
short amount of time to switch), but there is a 'alpha' version on
Pypi for people who want to switch now.
Minor new features
Add key to allow uploading the raw content of a file as a request body
Add new token which can match regex values in parts of responses
Strict key checking should now work with MQTT json payloads
Breaking changes
These changes have a chance of breaking some of your existing tests - they are
ordered roughly from most urgent to least urgent.
'body' key changes to 'json' in HTTP response
This is to maintain parity with the MQTT 'json' block as well as to signify that
it is only meant for checking JSON.
If your test was like this:
It should now be:
There should be no other effects from this change.
Python 2 dropped
Tavern will no longer support Python 2. There have been warnings from Tavern as
well as from Pip and other tools saying to upgrade to Python 3 for months now,
and with the dropping of official support of Python 2 Tavern will no longer
support it.
Changes to the way strictness works
'legacy' strict key checking (ie, strict key checking behaves differently for
the top level of a response) has been removed and it is now either on or off for
the whole response body.
Turning strictness 'off' will now also allow users to check that one item is
present in a list while ignoring the other items, a popular request.
More details in the
1.0 documentation
'null' checking on body
Before 1.0, any response body would be matched if
null
was specified in thetest response block. This has changed and
null
will now only match a JSONnull
. To match anything in the response use!anything
, or use one of theother type tokens to match any list (
!anylist
), any string (!anystr
), etc.'run' entry point slightly reworked
The arguments to the
run()
function have changed so that any extra keywordarguments will now raise an error rather than just warning. This is to bring it
more in line with the fact that it is just a thin layer over Pytest.
New error traceback is the default
The new 'fancy' error reporting is now the default when a Tavern error occurs (a
normal Python traceback is still shown for unexpected errors or bad schema
errors). This can be disabled by using the
tavern-use-default-traceback
flagin your pytest config file or on the command line.
External function blocks changes
Rather than putting a magic
$ext
key into the block to add an extra functionto verify part of a response, the function should now go into the
verify_response_with
block in the response block.$ext
functions can stillbe used in request blocks to insert extra data into the request however.
Save value path changes
When saving a value with the
save
block, the path to the thing to save shouldnow be given as a JMESpath rather than the 'old' style - ie, instead of
a.b.0
,use
a.b[0]
The text was updated successfully, but these errors were encountered: