Flea
Flea helps you test WSGI applications without starting up an HTTP server.
If you already know lxml, you’ll know what makes flea so powerful. Flea is fully integrated with lxml’s xpath api, letting you inspect, modify and navigate HTML documents returned from your WSGI application. Here’s an example session:
>>> agent = TestAgent(my_wsgi_app)
>>> agent.get('/')
>>> print agent.body
<html>
<body>
<a href="/sign-in">sign in</a>
</body>
</html>
>>> agent = agent["//a[.='sign in']"].click()
>>> print agent.request.request_uri
http://localhost/sign-in
>>> agent["//input[@name='username']"].value = 'root'
>>> agent["//input[@name='password']"].value = 'password'
>>> agent = agent["//input[@type='submit']"].submit()
Full package documentation: http://packages.python.org/flea/
Changelog
Version 4
Added support for file upload fields
Allow TestAgent.get/post etc to take a relative URI as an argument
Version 3
Updated setup.py for compatibility with pesto==14
Version 2
EXSLT regular expression namespace is bound to re prefix by default, allowing regexps in xpath expressions.
Bug fixes for form element handling
Version 1
Initial release
Metadata
Release files for flea 4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flea-4.tar.gz | 18.3 kB | Without provenance | Details for flea-4.tar.gz |
Release files / flea-4.tar.gz
| Download URL | flea-4.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e74c3d115dba05cc8027e617290f408add64c8b363c92845cc8441c3ef9da4d
|
|
BLAKE2b-256 checksum How to use checksums |
f565a1f4e66ef01fa18a29116fe72ed1d752381cd7b667ea42177235648645ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for flea 4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.