commit c6fb5d5cc641e7620e2a38cb0728101840e2da7c44a86a4eaae5df51c11ade16 Author: Dominique Leuenberger Date: Mon Feb 26 22:24:25 2018 +0000 Accepting request 579213 from devel:languages:python python-pytest-localserver , new dependency of python-responses OBS-URL: https://build.opensuse.org/request/show/579213 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-localserver?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pytest-localserver-0.4.1.tar.gz b/pytest-localserver-0.4.1.tar.gz new file mode 100644 index 0000000..6a8d8a2 --- /dev/null +++ b/pytest-localserver-0.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a72af60a1ec8f73668a7884c86baf1fbe48394573cb4fa36709887217736c021 +size 19901 diff --git a/python-pytest-localserver-do-not-use-shipped-pem.patch b/python-pytest-localserver-do-not-use-shipped-pem.patch new file mode 100644 index 0000000..cd1acc7 --- /dev/null +++ b/python-pytest-localserver-do-not-use-shipped-pem.patch @@ -0,0 +1,12 @@ +--- a/pytest_localserver/https.py 2013-10-16 15:47:29.000000000 +0200 ++++ b/pytest_localserver/https.py 2015-02-09 17:40:45.219146857 +0100 +@@ -9,8 +9,7 @@ + from pytest_localserver.http import ContentServer + + #: default server certificate +-DEFAULT_CERTIFICATE = os.path.join( +- os.path.abspath(os.path.dirname(__file__)), 'server.pem') ++DEFAULT_CERTIFICATE = "/etc/ssl/ca-bundle.pem" + + + class SecureContentServer (ContentServer): diff --git a/python-pytest-localserver.changes b/python-pytest-localserver.changes new file mode 100644 index 0000000..86571a1 --- /dev/null +++ b/python-pytest-localserver.changes @@ -0,0 +1,43 @@ +------------------------------------------------------------------- +Thu Feb 22 22:29:48 UTC 2018 - mimi.vx@gmail.com + +- update to 0.4.1 +- fix requires +- remove tests - not work without internal certificate and buggy on + python3 +* New feature: All received requests are now stored for ilater inspection + +------------------------------------------------------------------- +Thu Aug 17 20:01:38 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version +- Update to version 0.3.7 + * Add support for Python 3.6 + +------------------------------------------------------------------- +Sun Sep 18 09:30:17 UTC 2016 - mardnh@gmx.de + +- Fix URL +- Fix Source-URL +- Update to version 0.3.6 + + Add trove classifiers to make sure that package shows up on PyPI's Python 3 list. + + Remove test method which rely on thread to be finished first. + + OpenSSL is no longer necessary with werkzeug 0.10. + + Tests now work under Python 3.3 \o/ + + Fix for Python 3.5 (fixes #13). + + Add new Python version to classifiers. + + Update repository url + + Use @pytest.fixture to declare fixtures + + Remove old-style test fixtures from tests and README, too. + +------------------------------------------------------------------- +Mon Feb 9 17:17:11 UTC 2015 - p.drouand@gmail.com + +- Do not provide bundled certificate; + add python-pytest-localserver-do-not-use-shipped-pem.patch + +------------------------------------------------------------------- +Tue Nov 4 16:37:43 UTC 2014 - hpj@urpla.net + +- version 0.3.3: initial build + diff --git a/python-pytest-localserver.spec b/python-pytest-localserver.spec new file mode 100644 index 0000000..e89d6ba --- /dev/null +++ b/python-pytest-localserver.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-pytest-localserver +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 LISA GmbH, Bingen, 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-pytest-localserver +Version: 0.4.1 +Release: 0 +Summary: Plugin for py.test to test server connections locally +License: MIT +Group: Development/Languages/Python +Url: https://bitbucket.org/pytest-dev/pytest-localserver +Source: https://files.pythonhosted.org/packages/source/p/pytest-localserver/pytest-localserver-%{version}.tar.gz +Patch0: python-pytest-localserver-do-not-use-shipped-pem.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-Werkzeug +Requires: python-pytest +BuildArch: noarch + +%python_subpackages + +%description +The pytest-localserver package is a plugin for the `pytest`_ testing framework +which enables you to test server connections locally. + +Sometimes `monkeypatching`_ ``urllib2.urlopen()`` just does not cut it, for +instance if you work with ``urllib2.Request``, define your own openers/handlers +or work with ``httplib``. In these cases it may come in handy to have an HTTP +server running locally which behaves just like the real thing. Well, look +no further! + +%prep +%setup -q -n pytest-localserver-%{version} +%patch0 -p1 +rm -f pytest_localserver/server.pem.orig + +%build +%python_build + +%install +%python_install +%{python_expand rm -f %{buildroot}%{$python_sitelib}/pytest_localserver/server.pem +chmod a+x %{buildroot}%{$python_sitelib}/pytest_localserver/smtp.py +chmod a+x %{buildroot}%{$python_sitelib}/pytest_localserver/plugin.py +sed -i "s|^#!/usr/bin/env python$|#!%__$python|" %{buildroot}%{$python_sitelib}/pytest_localserver/smtp.py +sed -i "s|^#!/usr/bin/env python$|#!%__$python|" %{buildroot}%{$python_sitelib}/pytest_localserver/plugin.py +$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/pytest_localserver/ +$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/pytest_localserver/ +%fdupes %{buildroot}%{$python_sitelib} +} + +%files %{python_files} +%doc README +%license LICENSE +%{python_sitelib}/pytest_localserver +%{python_sitelib}/pytest_localserver-%{version}-py*.egg-info + +%changelog