FreeBSD Ports

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.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest1.13.11.13.11.11.01.13.11.13.1
FreeBSD:14:quarterly1.13.11.13.1n/a1.13.11.13.1
FreeBSD:15:latest1.13.11.13.1n/a1.13.11.13.1
FreeBSD:15:quarterly1.13.11.13.1n/an/an/a
FreeBSD:16:latest1.13.11.13.1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 2

Runtime 1

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
FileSizeSHA256
wsgi_intercept-1.13.1.tar.gz2928879bd6c639ab11f7eabe5d18ad9a20f62ee82a1c435124a876cffd8038f6c24c1
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.