# # spec file for package python-requests-mock # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # 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-%{**}} %bcond_with test Name: python-requests-mock Version: 1.5.2 Release: 1.1 Summary: Mock out responses from the requests package License: Apache-2.0 Group: Development/Languages/Python URL: https://requests-mock.readthedocs.org/ Source: https://files.pythonhosted.org/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz BuildRequires: %{python_module Sphinx >= 1.1.2} BuildRequires: %{python_module fixtures} BuildRequires: %{python_module mock} BuildRequires: %{python_module pbr} BuildRequires: %{python_module requests} BuildRequires: %{python_module rpm-macros} BuildRequires: %{python_module six} BuildRequires: %{python_module testrepository >= 0.0.18} BuildRequires: %{python_module testtools} BuildRequires: fdupes Requires: python-requests >= 1.1 Requires: python-six BuildArch: noarch %ifpython3 BuildRequires: python3-dbm Requires: python3-dbm %endif %python_subpackages %description requests-mock provides a building block to stub out the HTTP requests portions of your testing code. You should checkout the docs for more information. %prep %setup -q -n requests-mock-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib}/mymodule %if %{with test} %check mv .testr.conf .testr.conf.orig %{python_expand # first line can't be empty rm -rf .testrepository sed 's/python/$python/' .testr.conf.orig >| .testr.conf testr init testr run --parallel } %endif %files %{python_files} %license LICENSE %doc AUTHORS README.rst ChangeLog %{python_sitelib}/* %changelog * Thu Mar 7 2019 Thomas Bechtold - update to 1.5.2: * Fix discovery of pytest version and default * Add a docstring to the pytest fixture * Include release note for py.test * Collapse CircleCI configuration * Support older pytest versions * Record value of stream parameter in request history * Some additional gitignores * Include reno in circleci publish job * Prefer readthedocs.io instead of readthedocs.org for doc links * Add release note describe repository migration * Add pytest plugin * Include release-notes in documentation * Another attempt at circleci tags * Only try and push to pypi on a tag * Update all pypi.python.org URLs to pypi.org * Add pypi upload configuration to circleci * Move tests outside of package to top level directory * Remove zuul.yaml as we're not using zuul anymore * Add CircleCI badge to README * Remove links to launchpad bug reporting * Remove .gitreview * Unpin sphinx dependency * Add circleci testing configuration * Use set literals throughout project * Prefer https:// links over http:// in docs and comments * Fix last\_request examples * Fix spelling mistakes * Move Zuul jobs in-tree * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Fri Feb 23 2018 tbechtold@suse.com - update to 1.4.0: * allow an adapter to be passed to a Mocker object * Rename [wheel] section to [bdist\_wheel] as the former is legacy * Include license file in the generated wheel package * Add testing for newer Python versions 3.5 and 3.6 * Return a separate copy for each call to decorator * Add string representation to \_RequestObjectProxy * Wed Jun 14 2017 dmueller@suse.com - fix build for SLE12 * Sat Jun 10 2017 dmueller@suse.com - update to 1.3.0: * Add a releasenote for additional_matcher * Add documentation for the exception response * Fix occurences of `adatper` * Type check the empty string when creating repsonse * Allow arbirtrary matcher to be add to match * Thu May 25 2017 sebix+novell.com@sebix.at - convert to singlespec * Mon Jan 30 2017 tbechtold@suse.com - update to 1.2.0: * Allow for nested mocking * Use create_response for fake http response in tests * Add hostname and port properties to request * Move request code and tests into their own files * Add called_once to Mocker * Fix docs building * Fix exception message when creating a response * Wed Sep 28 2016 tbechtold@suse.com - update to 1.1.0: * Add a called_once property to adapter * Enable case sensitive matching * Provide fixture extras for pip * Allow doing real_http per mock via the mocker * Return b'' when reading closed response * Fixture documentation error * Fri Jul 8 2016 dmueller@suse.com - fix source url * Wed Jul 6 2016 tbechtold@suse.com - update to 1.0.0: * Add tox environment to run against master requests * Change dev status classifier to stable * Doc fixups * Expose cert and proxies as attributes of the last request * Add timeout and allow_retries to RequestProxy * Fix py34 DB issue and remove py33/py26 * Remove pypip.in badge from readme * Fri Dec 4 2015 dmueller@suse.com - update to 0.7.0: * Support Cookies * Expose Fake objects in compat * Update .gitreview for new namespace * Change ignore-errors to ignore_errors * Mon Apr 20 2015 tbechtold@suse.com - Fix license string * Mon Feb 2 2015 dmueller@suse.com - update 0.6.0: * Update docs * Allow to decorate class with mock * Use weakref to hold matcher * Include matcher in request history * Add called and call_count to mocker * Update README to use newer syntax * Allow specifying an exception to raise * Update novaclient and keystoneclient git repo * Add pbr to all tox environments * Add docs environment to tox.ini * Work toward Python 3.4 support and testing * Run tip tests against requests master as well * Add link to find bug tracker * Fri Sep 26 2014 tbechtold@suse.com - Initial package