c2f81b7
%global         srcname  aioresponses
c2f81b7
%global         desc     Aioresponses is a helper to mock/fake web requests in the python\
c2f81b7
aiohttp package. The purpose of this package is to provide an\
c2f81b7
easy way  to test asynchronous HTTP requests.
c2f81b7
c2f81b7
Name:           python-%{srcname}
c2f81b7
Version:        0.6.0
c2f81b7
Release:        1%{?dist}
c2f81b7
Summary:        Mock out requests made by ClientSession from aiohttp package
c2f81b7
c2f81b7
License:        MIT
c2f81b7
URL:            https://github.com/pnuckowski/aioresponses
c2f81b7
Source0:        %pypi_source
c2f81b7
c2f81b7
BuildArch:      noarch
c2f81b7
c2f81b7
# required for py3_build macro
c2f81b7
BuildRequires:  python3-devel
c2f81b7
c2f81b7
# from setup.py
c2f81b7
BuildRequires: python3-pbr
c2f81b7
BuildRequires: python3-aiohttp
c2f81b7
c2f81b7
## for tests
c2f81b7
BuildRequires: python3-watchdog
c2f81b7
BuildRequires: python3-pytest
c2f81b7
BuildRequires: python3-pytest-cov
c2f81b7
BuildRequires: python3-ddt
c2f81b7
BuildRequires: python3-asynctest
c2f81b7
c2f81b7
%{?python_enable_dependency_generator}
c2f81b7
c2f81b7
%description
c2f81b7
%{desc}
c2f81b7
c2f81b7
%package -n python3-%{srcname}
c2f81b7
Summary:        %{summary}
c2f81b7
%{?python_provide:%python_provide python3-%{srcname}}
c2f81b7
c2f81b7
%description -n python3-%{srcname}
c2f81b7
%{desc}
c2f81b7
c2f81b7
%prep
c2f81b7
%autosetup -p1 -n %{srcname}-%{version}
c2f81b7
c2f81b7
# disable one test that connects to httpbin.org
c2f81b7
sed -i 's/def \(test_address_as_instance_of_url_combined_with_pass_through\)(/def skip_\1(/' tests/test_aioresponses.py
c2f81b7
c2f81b7
%build
c2f81b7
%py3_build
c2f81b7
c2f81b7
c2f81b7
%install
c2f81b7
%py3_install
c2f81b7
c2f81b7
%check
c2f81b7
%{__python3} setup.py test
c2f81b7
c2f81b7
%files -n python3-%{srcname}
c2f81b7
%license LICENSE
c2f81b7
%doc README.rst
c2f81b7
%{python3_sitelib}/%{srcname}/
c2f81b7
%{python3_sitelib}/%{srcname}-*-py*.egg-info/
c2f81b7
c2f81b7
c2f81b7
%changelog
c2f81b7
c2f81b7
* Tue Mar 26 2019 Georg Sauthoff <mail@gms.tf> - 0.6.0-1
c2f81b7
- initial packaging