-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅[#46] add update session profile tests
- Loading branch information
Showing
6 changed files
with
80 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from importlib import import_module | ||
|
||
from django.conf import settings | ||
from django.contrib.sessions.backends.base import SessionBase | ||
|
||
|
||
def get_session_store() -> SessionBase: | ||
return import_module(settings.SESSION_ENGINE).SessionStore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
from importlib import import_module | ||
# import pytest | ||
|
||
from django.conf import settings as django_settings | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def cache_session_store(settings): | ||
settings.SESSION_ENGINE = "django.contrib.sessions.backends.cache" | ||
return import_module(django_settings.SESSION_ENGINE).SessionStore | ||
|
||
|
||
@pytest.fixture | ||
def db_session_store(settings): | ||
settings.SESSION_ENGINE = "django.contrib.sessions.backends.db" | ||
return import_module(django_settings.SESSION_ENGINE).SessionStore | ||
# @pytest.fixture | ||
# def some_fixture(request): | ||
# return "foo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters