webtest-flask-fixture
Providing a fixture for static websites to use WebTest through Flask
Why WebTest?
WebTest provides a great interface for testing websites including button/link and form interactions.
Why Flask?
Flask comes with an extremely light-weight dev server that can server up arbitrary pages (static or coded) relatively easily.
Let's put the two together!!
And this package is born. The objective is to provide a PyTest.fixture that allows for quickly testing static web sites, or through customizing the template, a fixture that can be used to test more complex web sites.
Installation
pip install webtest-flask-fixture
or, from source:
pip install git+git://github.com/mshafer1/webtest-flask-fixture.git@0.5.1
Useage
Start writing a PyTest test, and use webtest_flask_fixture.test_app to load pages.
Example:
from webtest_flask_fixture import test_app
def test_can_load_test_index(test_app):
# Act
resp = test_app.get('/')
# Assert
assert resp.status_int == 200
assert resp.content_type == 'text/html'
assert 'Hello, World!' in resp # string must be present in body
More examples in examples.
Future
Currently WebTest does not execute JS in the page, we would like to also integrate selenium such that a user can apply our PyTest fixture and get a full experience.
Metadata
Release files for webtest-flask-fixture 0.5.1
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 |
|---|---|---|---|---|
| webtest_flask_fixture-0.5.1.tar.gz | 4.4 kB | Without provenance | Details for webtest_flask_fixture-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| webtest_flask_fixture-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for webtest_flask_fixture-0.5.1-py3-none-any.whl |
Total release size: 9.0 kB
Release files / webtest_flask_fixture-0.5.1.tar.gz
| Download URL | webtest_flask_fixture-0.5.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0579dc94ad43447fc7d3ccf4c3dd33cbdfaf1c3bd929eda90949abd5be78dab5
|
|
BLAKE2b-256 checksum How to use checksums |
836a3d4c9cc5bea287cc93f8a8f22e61f4e6380018769575f5c493a5d2fa4119
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.0
|
Release files / webtest_flask_fixture-0.5.1-py3-none-any.whl
| Download URL | webtest_flask_fixture-0.5.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48b40b78b7332c2351be533cdaf08e88a099d2188c2ecc9fccd92b239266ef1e
|
|
BLAKE2b-256 checksum How to use checksums |
e4c3da5809a0d0c8527a6b233fc832df8d5c97c97dce44b2206e15c1b4dd8a92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.0
|
Security for webtest-flask-fixture 0.5.1
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.