Skip to content

Commit

Permalink
Fix error in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kakshay21 committed Jan 29, 2018
1 parent 4537364 commit 9688503
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions docs/source/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,6 @@ For example, to authenticate using HTTP basic auth, you'd set an ``Authorization

HTTP client libraries usually contain helper functions to produce a proper ``Authorization`` header for you based on given credentials.

Using the ``requests`` library, you'd set up a session with basic auth like this:

.. code-block:: python
import requests
session = requests.Session()
session.auth = ('username', 'password')
session.headers.update({'Accept': 'application/json'})
response = session.get(url)
Or the same example using ``curl``:

.. code-block:: bash
curl -u username:password -H 'Accept:application/json' $URL

JSON Web Tokens (JWT)
---------------------
Expand Down
2 changes: 1 addition & 1 deletion src/plone/restapi/tests/test_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def save_request_and_response_for_docs(name, response):
reqs[i] = reqs[i].replace('plone', 'Plone')
json_body['source'] = reqs
elif 'id' in json_body:
reqs = json_body['source']
reqs = json_body['id']
if isinstance(reqs, str) or isinstance(reqs, unicode):
reqs = reqs.replace('55001', '8080')
reqs = reqs.replace('plone', 'Plone')
Expand Down

0 comments on commit 9688503

Please sign in to comment.