devel/py-wsgi-intercept 1.13.1
WSGI application in place of a real URI for testing
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- License
- MIT
- Categories
- devel, python
- Package size
- 51.8 KiB, 282.5 KiB installed
Description
Testing a WSGI application sometimes involves starting a server at a local host and port, then pointing your test code to that address. Instead, this library lets you intercept calls to any specific host/port combination and redirect them into a WSGI application importable by your test program. Thus, you can avoid spawning multiple processes or threads to test your Web app.
wsgi_intercept works with a variety of HTTP clients in Python 2.7, 3.5 and beyond, and in pypy.
- urllib2
- urllib.request
- httplib
- http.client
- httplib2
- requests
- urllib3
wsgi_intercept works by replacing httplib.HTTPConnection with a subclass, wsgi_intercept.WSGI_HTTPConnection. This class then redirects specific server/port combinations into a WSGI application by emulating a socket. If no intercept is registered for the host and port requested, those requests are passed on to the standard handler.
Install
As a binary package — by origin, or by package name:
pkg install devel/py-wsgi-intercept
pkg install py312-wsgi-intercept
From the ports tree:
cd /usr/ports/devel/py-wsgi-intercept/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= py312-wsgi-intercept>0:devel/py-wsgi-intercept
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 1.13.1 | 1.13.1 | 1.11.0 | 1.13.1 | 1.13.1 |
| FreeBSD:14:quarterly | 1.13.1 | 1.13.1 | n/a | 1.13.1 | 1.13.1 |
| FreeBSD:15:latest | 1.13.1 | 1.13.1 | n/a | 1.13.1 | 1.13.1 |
| FreeBSD:15:quarterly | 1.13.1 | 1.13.1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 1.13.1 | 1.13.1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 2
${PYTHON_PKGNAMEPREFIX}setuptools>=0: devel/py-setuptools${PYTHON_PKGNAMEPREFIX}wheel>=0: devel/py-wheel
Runtime 1
${PYTHON_PKGNAMEPREFIX}six>=0: devel/py-six
The full lists below include those, and their dependencies in turn.
All build dependencies 16
All run dependencies 8
No port depends on this one.
Configuration
No options to configure.
- USES
- python
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| wsgi_intercept-1.13.1.tar.gz | 29288 | 79bd6c639ab11f7eabe5d18ad9a20f62ee82a1c435124a876cffd8038f6c24c1 |
Master sites 2
- PYPI
- https://github.com/cdent/wsgi-intercept/releases/download/v1.13.1/
Commit history 0
No commits in the history this site was built from.