We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76b10f1 commit 20bf80bCopy full SHA for 20bf80b
pytest_django/plugin.py
@@ -354,15 +354,13 @@ def pytest_runtest_setup(item):
354
355
def pytest_collection_modifyitems(session, config, items):
356
def get_marker_transaction(test):
357
- marker = test.get_marker("django_db")
+ marker = test.get_closest_marker('django_db')
358
if marker:
359
- validate_django_db(marker)
360
- return marker.transaction
+ return validate_django_db(marker)[0]
361
return None
362
363
def has_fixture(test, fixture):
364
- funcargnames = getattr(test, 'funcargnames', None)
365
- return funcargnames and fixture in funcargnames
+ return fixture in getattr(test, 'funcargnames', [])
366
367
def get_order_number(test):
368
if get_marker_transaction(test) is True:
0 commit comments