[proposition] pytest fixture
See original GitHub issueHave you thought about making a fixture for pytest?
it would be extremely great to be able to use webtest like this
@pytest.mark.django_db
def test_django(app):
resp = app.get('/smth/', user='smone')
form = resp.forms['main']
form['some_field'] = 'smth'
submitted = form.submit()
assert submitted.status_int == 200
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (15 by maintainers)
Top Results From Across the Web
pytest fixtures: explicit, modular, scalable
“Fixtures”, in the literal sense, are each of the arrange steps and data. They're everything that test needs to do its thing. At...
Read more >Create A Yield Pytest Fixture - Cameron Maske
Short, instructive video on using a pytest yield fixture to add teardown logic to keep your test isolated. The example show to extend...
Read more >Pytest Tutorial: Sharing Fixtures Through conftest - YouTube
Pytest Tutorial: Sharing Fixtures Through conftestPytest fixtures are one of the core features that make pytest framework stand out above ...
Read more >How to synchronize parametrization across pytest fixtures?
Your last proposition is the best one. – MrBean Bremen. Aug 7, 2020 at 6:01. Add a ...
Read more >Fixture "..." called directly · Issue #3950 · pytest-dev ... - GitHub
_pytest/fixtures.py:799: RemovedInPytest4Warning: Fixture "..." called directly. Fixtures are not meant to be called directly, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

https://github.com/django-webtest/django-webtest/pull/62
You can specify options in a (setup|pytest).cfg and override it from the command line when needed
No globals!