[pytest] create session-scoped django.test.Client
fixture
This commit is contained in:
parent
55be0c8370
commit
1f100d329b
1 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,12 @@
|
|||
import pytest
|
||||
from django.test import Client
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def enable_db_access_for_all_tests(db):
|
||||
pass
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", name="session")
|
||||
def fixture_longlived_client() -> Client:
|
||||
return Client()
|
||||
|
|
Loading…
Add table
Reference in a new issue