# # spec file for package python-httpretty # # Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 %define skip_python36 1 %define skip_python39 1 Name: python-httpretty Version: 1.1.4 Release: 1.1 Summary: HTTP client mocking tool for Python License: MIT Group: Development/Languages/Python URL: https://github.com/gabrielfalcao/HTTPretty Source: https://files.pythonhosted.org/packages/source/h/httpretty/httpretty-%{version}.tar.gz BuildRequires: %{python_module eventlet} BuildRequires: %{python_module fakeredis} BuildRequires: %{python_module freezegun} BuildRequires: %{python_module httplib2} BuildRequires: %{python_module nose2} BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module sure} BuildRequires: %{python_module tornado} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch %python_subpackages %description This library allows mocking of HTTP protocol based unit tests. It is similar to Ruby's FakeWeb. %prep %setup -q -n httpretty-%{version} # no test coverage check needed sed -i -e '/cover/ d' setup.cfg # no color printout for tests sed -i -e '/rednose/ d' setup.cfg %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # https://github.com/gabrielfalcao/HTTPretty/issues/405 export EVENTLET_NO_GREENDNS=yes # test_http_passthrough and test_https_passthrough need internet connection sed -Ei 's/(test_https?_passthrough)/_\1/' tests/functional/test_passthrough.py # fails on 15.1 sed -Ei 's/(test_streaming_responses)/_\1/' tests/functional/test_requests.py # fails on x86_64 sed -Ei 's/(test_fakesock_socket_sendall_with_body_data_with_chunked_entry)/_\1/' tests/unit/test_core.py %python_exec -m nose2 -v %files %{python_files} %license COPYING %doc README.rst %{python_sitelib}/httpretty %{python_sitelib}/httpretty-%{version}*-info %changelog * Sat Mar 12 2022 Arun Persaud - specfile: * update copyright year - update to version 1.1.4: * Bugfix: #435 Fallback to WARNING when logging.getLogger().level is None. - changes from version 1.1.3: * Bugfix: #430 Respect socket timeout. - changes from version 1.1.2: * Bugfix: #426 Segmentation fault when running against a large amount of tests with pytest --mypy. - changes from version 1.1.1: * Bugfix: httpretty.disable() injects pyopenssl into :py:mod:`urllib3` even if it originally wasn't #417 * Bugfix: "Incompatibility with boto3 S3 put_object" #416 * Bugfix: "Regular expression for URL -> TypeError: wrap_socket() missing 1 required" #413 * Bugfix: "Making requests to non-stadard port throws TimeoutError "#387 - changes from version 1.1.0: * Feature: Display mismatched URL within UnmockedError whenever possible. #388 * Feature: Display mismatched URL via logging. #419 * Add new properties to :py:class:`httpretty.core.HTTPrettyRequest` (protocol, host, url, path, method). * Mon Mar 22 2021 Ben Greiner - Updater to 1.0.5 * Bugfix: Support socket.socketpair() . #402 * Bugfix: Prevent exceptions from re-applying monkey patches. [#406] - Release 1.0.4 * Python 3.8 and 3.9 support. #407 * Mon Dec 14 2020 Benjamin Greiner - Update to 1.0.3 * Fix compatibility with urllib3>=1.26. #410 * Sun Aug 16 2020 John Vandenberg - Replace nose with nose2 * Wed Aug 12 2020 Benjamin Greiner - avoid reading DNS resolver settings gh#gabrielfalcao/HTTPretty#405 - remove unnecessary test packages * Thu Apr 9 2020 Marketa Calabkova - Update to 1.0.2 * Drop Python 2 support. * Fix usage with redis and improve overall real-socket passthrough. * Fix TypeError: wrap_socket() missing 1 required positional argument: 'sock'. * Fix simple typo: neighter -> neither. * Updated documentation for register_uri concerning using ports. * Clarify relation between ``enabled`` and ``httprettized`` in API docs. * Align signature with builtin socket. * Mon Jan 7 2019 Tomáš Chvátal - Version update to 0.9.6: * Many fixes all around * Support for python 3.7 - Make sure we really run the tests * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Sat Aug 26 2017 jengelh@inai.de - Fix spello in description. Move summary extent to description. * Tue Aug 15 2017 daniel.molkentin@suse.com - Update to 0.8.14 - Converted to singlespec - Remove legacy macros - Ran spec-cleaner * Sun Mar 13 2016 dmueller@suse.com - add copying * Wed Apr 22 2015 mcihar@suse.cz - Update to 0.8.8: * many changes * Wed Jul 23 2014 mcihar@suse.cz - Upgrate to 0.8.3: * various minor fixes * Mon Feb 17 2014 speilicke@suse.com - Drop old tarball * Mon Feb 17 2014 dmueller@suse.com - update to 0.8.0: * This new version brings Python 3 support, leaner requirements - remove deps-cleanup.diff * Fri Jan 17 2014 speilicke@suse.com - Update to version 0.7.1: + Bug fix: POST requests being called twice #100 - Rebased deps-cleanup.diff * Mon Oct 28 2013 speilicke@suse.com - Don't install global "tests" module into python_sitelib * Mon Oct 21 2013 dmueller@suse.com - update to 0.7.0: * Refactored core.py and increased its unit test coverage to 80%%. HTTPretty is slightly more robust now * Thu Sep 26 2013 dmueller@suse.com - update to 0.6.4: * Add a way to match the querystrings * Mon Sep 2 2013 dmueller@suse.com - Initial package (0.6.3)