Skip to main content

Functional testing for WSGI: drive WSGI apps from your test suite

Project description

Flea helps you write functional tests for WSGI applications.

Flea uses CSS selectors and XPath to give you a powerful tool to drive and test the output of your WSGI web applications. Here’s an example of how easy it is to test a WSGI application:

>>> from flea import Agent
>>> r = Agent(my_wsgi_app).get('/')
>>> print r.body
<html>
        <body>
                <a href="/sign-in">sign in</a>
        </body>
</html>
>>> r = r.click('sign in')
>>> r = r("form#login-form").fill(
...     username = 'root',
...     password = 'secret',
... ).submit()
>>> assert 'login successful' in r.body

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flea-9.0.0.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flea-9.0.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file flea-9.0.0.tar.gz.

File metadata

  • Download URL: flea-9.0.0.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for flea-9.0.0.tar.gz
Algorithm Hash digest
SHA256 3b9cdb22d21c4e2a11af45bb836a172a1fdc037940f01dcdc878208967044ce5
MD5 04f7210993e71fdc0a8ea12770963873
BLAKE2b-256 c54e65a3bac29f68d2e58e24ef92fe224bf739ef3b376e3aba775246fe1b38cc

See more details on using hashes here.

File details

Details for the file flea-9.0.0-py3-none-any.whl.

File metadata

  • Download URL: flea-9.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for flea-9.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e27ee7ae348186b19331cd9ce4eec47c4f750142a825c6eb698638b9cae1240
MD5 5ca67cbd9967dd26dc6da38a27212b21
BLAKE2b-256 efb965bf0d9d25e0c6cf5b959c3101247580ff61c6345a0a791c2c7bbbd2360f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page