...
 
Commits (3)
Metadata-Version: 1.1
Name: pytest-localserver
Version: 0.3.7
Version: 0.5.0
Summary: py.test plugin to test server connections locally.
Home-page: http://bitbucket.org/pytest-dev/pytest-localserver/
Author: Sebastian Rahlf
Author-email: basti AT redtoad DOT de
Author-email: basti@redtoad.de
License: MIT License
Download-URL: http://bitbucket.org/pytest-dev/pytest-localserver/downloads/
Description: ==================
......@@ -104,6 +104,13 @@ Description: ==================
which will display them as parsable text.
If you need to inspect the requests sent to the server, a list of all
received requests can be found in property
* ``requests``
which is a list of ``werkzeug.wrappers.Request`` objects.
``httpsserver``
is the same as ``httpserver`` only with SSL encryption.
......@@ -222,4 +229,6 @@ Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Testing
......@@ -95,6 +95,13 @@ poking around in the code itself.
which will display them as parsable text.
If you need to inspect the requests sent to the server, a list of all
received requests can be found in property
* ``requests``
which is a list of ``werkzeug.wrappers.Request`` objects.
``httpsserver``
is the same as ``httpserver`` only with SSL encryption.
......
pytest-localserver (0.3.7-3) UNRELEASED; urgency=medium
pytest-localserver (0.5.0-1) unstable; urgency=medium
[ Emanuele Rocca ]
* QA upload
* New upstream release 0.5.0
* Provide new server.pem meeting OpenSSL SECLEVEL 2 requirements
(Closes: #911836)
* Bump Standards-Version
[ Ondřej Nový ]
* d/control: Remove ancient X-Python-Version field
* d/control: Remove ancient X-Python3-Version field
-- Ondřej Nový <onovy@debian.org> Mon, 14 May 2018 07:59:06 +0200
-- Emanuele Rocca <ema@debian.org> Mon, 25 Feb 2019 20:40:05 +0100
pytest-localserver (0.3.7-2) unstable; urgency=medium
......
......@@ -17,7 +17,7 @@ Build-Depends:
python3-setuptools,
python3-six,
python3-werkzeug (>= 0.10)
Standards-Version: 3.9.8
Standards-Version: 4.3.0
Homepage: https://bitbucket.org/pytest-dev/pytest-localserver/
Vcs-Git: https://salsa.debian.org/python-team/modules/pytest-localserver.git
Vcs-Browser: https://salsa.debian.org/python-team/modules/pytest-localserver
......
Description: new certificate meeting OpenSSL SECLEVEL 2
Fix compilation error "ca md too weak" by generating a new certificate meeting
the requirements of OpenSSL SECLEVEL 2.
.
See https://wiki.debian.org/ContinuousIntegration/TriagingTips/openssl-1.1.1
.
Author: Emanuele Rocca <ema@debian.org>
Bug-Debian: https://bugs.debian.org/911836
Last-Update: 2019-02-25
--- pytest-localserver-0.5.0.orig/pytest_localserver/server.pem
+++ pytest-localserver-0.5.0/pytest_localserver/server.pem
@@ -1,81 +1,49 @@
------BEGIN RSA PRIVATE KEY-----
-MIIJKAIBAAKCAgEA0phLUETPqoTk32D857Cg1HHtpp07IR34uz5/Vnw+5HNG+51u
-LQCrRktVySyfDGhJTVTv+Ysx3+g4Fq0uU/sYvaZSoZSziH7LetoWpYuU34QAMFTg
-8Pk7Tli1axUJz0G5pO6ClUf9i25pFS8/lbk335d4MGc6w//+pthpuhzan8PaufP1
-DOVQPIcvrsDjZI1/yb0zBKTYKPaRGoTrM2lgX3BKVApSAq1fL8NYzBx9vR3Fwo/5
-sRPRWl9BpQNxv6zDYV2CtrfK9D1opxZulTi45r0aPcVqY1tY79ZdXoO+0dVVJSnE
-WH3RmCDKS229Sg6wTZp+qIHw8WTkAXxX7Wg7wHp5l7Ml7gnoM00pzEvk1ZwPnzyX
-ai0R3ADhhmJx3nDUNx+3QmQ+miFD1brn1W+oUf//Wylx2zP5numWVrXuwvPoHUez
-dJwHXpIAYxByG8RhER/OB7J45lFgwQPEYpkATP3LMZNc19K6jqp70HTgW+3ICTWC
-IX+5zyOGDLPJnxmmGM5pNuy/s5k4Ojf7+k39fxGwUEZvQ2otlj7lKddBYwjcyQeg
-Q9d25ubiHPGaFlAJG1PdUPumulsPto3Kf74d88SXDIjXq9DemVETlUk/hCB0ohNx
-r3tKFNNS0rOd5VPzqPowbIsz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KDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
+AQUAA4IBDwAwggEKAoIBAQCd3M8rihBCV9soUdRjbhIl32y2+O9Gufxi4slIiANa
+yDaIHJDSqpxgrGGV1IZpyr4Whyq77x8zsSg0cFSZemqeHVJVr9vQZTcIl+o84ktM
+Vtv8CShLgNzf0iwa+2q9t7/9w91c9PG2tWS7bOGC/6RRprxIj8icQe6M9Sh3jWBR
+5VTzlb1Xczf6WMq+9OPJf+xGdq67SaMdWxd96NQ+F2ZAbGB42agZWlvsdIgY/Pll
+fSjkccUteiUk6y/npbtyel1rgW/WSqzwmjgKKOEUGvfyzXZiv3f93ZGesxUppfeu
+h3cQSvBLMfDx3VQY82amX/9uOEUnEtmMeYqbCInQUSszAgMBAAGjUzBRMB0GA1Ud
+DgQWBBTDgysFIBMd5LgLqf8sHjasxNw/lTAfBgNVHSMEGDAWgBTDgysFIBMd5LgL
+qf8sHjasxNw/lTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB+
+JTBV4Z9Sox0ebzux9lv8ehdr4jdP87l3n6Wz4VJylTjFi/WIxQ5JElWdvveXv2R5
+YM8BnVB6Xl5Ru+M1szP7F88Q6ywhQxP5xWrrTToaSZXOy2uw8pwEv149ytntmjrC
+T74hFZgXr9lpws+aYQWIPAwfgoHigJqFP53k/Q2jKOdGTwgZKCeKPfnn11podT1f
+k9EeCCOMiWiapbtpC8NVSSVaVVuAXe064GsaaMEqhANnwA17vrQk/fY0mMcU197V
+LdEws20j2W1w6LpCLe8ssBpiVGIumpgdINjmCnjBInaO1xtHFPA+qSy3O/ggz1vX
+AgVXneP8V2eB3lEFhvo8
-----END CERTIFICATE-----
CA_MD_TOO_WEAK_bug_911836.diff
VERSION = '0.3.7'
VERSION = '0.5.0'
......@@ -66,12 +66,14 @@ class ContentServer(WSGIServer):
self.headers = {}
self.show_post_vars = False
self.compress = None
self.requests = []
def __call__(self, environ, start_response):
"""
This is the WSGI application.
"""
request = Request(environ)
self.requests.append(request)
if (request.content_type == 'application/x-www-form-urlencoded'
and request.method == 'POST' and self.show_post_vars):
content = json.dumps(request.form)
......
......@@ -10,9 +10,12 @@
import asyncore
import email
import smtpd
import sys
import threading
PY35_OR_NEWER = sys.version_info[:2] >= (3, 5)
class Server (smtpd.SMTPServer, threading.Thread):
"""
......@@ -32,7 +35,12 @@ class Server (smtpd.SMTPServer, threading.Thread):
WAIT_BETWEEN_CHECKS = 0.001
def __init__(self, host='localhost', port=0):
smtpd.SMTPServer.__init__(self, (host, port), None)
# Workaround for deprecated signature in Python 3.6
if PY35_OR_NEWER:
smtpd.SMTPServer.__init__(self, (host, port), None, decode_data=True)
else:
smtpd.SMTPServer.__init__(self, (host, port), None)
if self._localaddr[1] == 0:
self.addr = self.socket.getsockname()
......@@ -48,9 +56,22 @@ class Server (smtpd.SMTPServer, threading.Thread):
Adds message to outbox.
"""
try:
self.outbox += [email.message_from_bytes(data)]
message = email.message_from_bytes(data)
except AttributeError:
self.outbox += [email.message_from_string(data)]
message = email.message_from_string(data)
# on the message, also set the envelope details
class Bunch:
def __init__(self, **kwds):
vars(self).update(kwds)
message.details = Bunch(
peer=peer,
mailfrom=mailfrom,
rcpttos=rcpttos,
**kwargs
)
self.outbox.append(message)
def run(self):
"""
......
[metadata]
description-file = README
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
......@@ -2,7 +2,7 @@ from setuptools import setup, Command
import sys
VERSION = '0.3.7'
VERSION = '0.5.0'
def read(fname):
......@@ -32,7 +32,7 @@ setup(
name='pytest-localserver',
version=VERSION,
author='Sebastian Rahlf',
author_email='basti AT redtoad DOT de',
author_email='basti@redtoad.de',
license='MIT License',
description='py.test plugin to test server connections locally.',
long_description=read('README'),
......@@ -46,7 +46,6 @@ setup(
cmdclass={'test': PyTest},
tests_require=[
'pytest>=2.0.0',
'six',
'requests'
],
entry_points={
......@@ -69,6 +68,8 @@ setup(
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Testing'
]
)
import gzip
import requests
import six
from pytest_localserver import http, plugin
from pytest_localserver import VERSION
# define test fixture here again in order to run tests without having to
......@@ -29,6 +26,13 @@ def test_some_content_retrieval(httpserver):
assert resp.status_code == 200
def test_request_is_stored(httpserver):
httpserver.serve_content('TEST!')
assert len(httpserver.requests) == 0
resp = requests.get(httpserver.url)
assert len(httpserver.requests) == 1
def test_GET_request(httpserver):
httpserver.serve_content('TEST!', headers={'Content-type': 'text/plain'})
resp = requests.get(httpserver.url, headers={'User-Agent': 'Test method'})
......
......@@ -65,6 +65,9 @@ def test_send_email(smtpserver):
assert msg['To'] == 'alice@example.com'
assert msg['From'] == 'webmaster@example.com'
assert msg['Subject'] == 'Your e-mail is getting there'
assert msg.details.rcpttos == ['alice@example.com']
assert msg.details.peer
assert msg.details.mailfrom
# send another e-mail
send_plain_email(
......
[tox]
envlist = py26,py27,py33,py34,py35,py36
envlist = py26,py27,py33,py34,py35,py36,py37
recreate = True
[tox:hudson]
......