The has_data() method of http.request.Request
was removed in version 3.4.
.. code-block:: pycon
- >>> mock.has_data()
+ >>> mock.header_items()
<mock.Mock object at 0x...>
- >>> mock.has_data.assret_called_with() # Intentional typo!
+ >>> mock.header_items.assret_called_with() # Intentional typo!
Auto-speccing solves this problem. You can either pass ``autospec=True`` to
:func:`patch` / :func:`patch.object` or use the :func:`create_autospec` function to create a
.. method:: HTTPHandler.http_open(req)
Send an HTTP request, which can be either GET or POST, depending on
- ``req.has_data()``.
+ ``req.data``.
.. _https-handler-objects:
.. method:: HTTPSHandler.https_open(req)
Send an HTTPS request, which can be either GET or POST, depending on
- ``req.has_data()``.
+ ``req.data``.
.. _file-handler-objects: