Skip to content

Commit

Permalink
issue-547 http header quality factor number (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
thefunkinator authored Jul 13, 2023
1 parent ad2210c commit b1e5d19
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ Releases prior to 0.3.0 were “best effort” filled out, but are missing
some info. If you see your contribution missing info, please open a PR
on the Changelog!

.. _section-1.1.1:
1.1.0
-----
.. _bug_fixes-1.1.1
Bug Fixes
~~~~~~~~~

::

* Fixing test as HTTP Header MIMEAccept expects quality-factor number in form of `X.X` (#547) [chipndell]


.. _section-1.1.0:
1.1.0
-----
Expand Down
5 changes: 3 additions & 2 deletions tests/legacy/test_api_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_media_types_method(self, app, mocker):
api = restx.Api(app)

with app.test_request_context(
"/foo", headers={"Accept": "application/xml; q=.5"}
"/foo", headers={"Accept": "application/xml; q=0.5"}
):
assert api.mediatypes_method()(mocker.Mock()) == [
"application/xml",
Expand All @@ -119,7 +119,8 @@ def test_media_types_q(self, app):
api = restx.Api(app)

with app.test_request_context(
"/foo", headers={"Accept": "application/json; q=1, application/xml; q=.5"}
"/foo",
headers={"Accept": "application/json; q=1.0, application/xml; q=0.5"},
):
assert api.mediatypes() == ["application/json", "application/xml"]

Expand Down

0 comments on commit b1e5d19

Please sign in to comment.