python-requests-mock/python-requests-mock.spec
Dirk Mueller 1b9101db59 Accepting request 430714 from home:tbechtold:branches:devel:languages:python
- 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

OBS-URL: https://build.opensuse.org/request/show/430714
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-mock?expand=0&rev=8
2016-09-28 16:32:09 +00:00

68 lines
2.1 KiB
RPMSpec

#
# spec file for package python-requests-mock
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#
Name: python-requests-mock
Version: 1.1.0
Release: 0
Summary: Mock out responses from the requests package
License: Apache-2.0
Group: Development/Languages/Python
Url: https://requests-mock.readthedocs.org/
Source: https://pypi.io/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-fixtures
BuildRequires: python-mock
BuildRequires: python-pbr
BuildRequires: python-requests
BuildRequires: python-six
BuildRequires: python-sphinx >= 1.1.2
BuildRequires: python-testrepository >= 0.0.18
BuildRequires: python-testtools
Requires: python-requests >= 1.1
Requires: python-six
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%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 setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
testr init
testr run --parallel
%files
%defattr(-,root,root,-)
%doc AUTHORS README.rst LICENSE ChangeLog
%{python_sitelib}/*
%changelog