File tree Expand file tree Collapse file tree 6 files changed +9
-15
lines changed Expand file tree Collapse file tree 6 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 1- import os
2-
31import django
42
53ROOT_URLCONF = "pytest_django_test.urls"
1412STATIC_URL = "/static/"
1513SECRET_KEY = "foobar"
1614
17- # Used to construct unique test database names to allow detox to run multiple
18- # versions at the same time
19- db_suffix = "_%s" % os .getuid ()
20-
2115MIDDLEWARE = [
2216 "django.contrib.sessions.middleware.SessionMiddleware" ,
2317 "django.middleware.common.CommonMiddleware" ,
Original file line number Diff line number Diff line change 1- from .settings_base import * # noqa: F403
1+ from .settings_base import * # noqa: F401 F403
22
33DATABASES = {
44 "default" : {
55 "ENGINE" : "django.db.backends.mysql" ,
6- "NAME" : "pytest_django" + db_suffix , # noqa: F405
6+ "NAME" : "pytest_django_should_never_get_accessed" ,
77 "HOST" : "localhost" ,
88 "USER" : "root" ,
99 "OPTIONS" : {"init_command" : "SET default_storage_engine=InnoDB" },
Original file line number Diff line number Diff line change 1- from pytest_django_test .settings_base import * # noqa: F403
1+ from .settings_base import * # noqa: F401 F403
22
33DATABASES = {
44 "default" : {
55 "ENGINE" : "django.db.backends.mysql" ,
6- "NAME" : "pytest_django" + db_suffix , # noqa: F405
6+ "NAME" : "pytest_django_should_never_get_accessed" ,
77 "HOST" : "localhost" ,
88 "USER" : "root" ,
99 "OPTIONS" : {"init_command" : "SET default_storage_engine=MyISAM" },
Original file line number Diff line number Diff line change 1- from pytest_django_test .settings_base import * # noqa
1+ from .settings_base import * # noqa: F401 F403
22
33# PyPy compatibility
44try :
1212DATABASES = {
1313 "default" : {
1414 "ENGINE" : "django.db.backends.postgresql_psycopg2" ,
15- "NAME" : "pytest_django" + db_suffix , # noqa
15+ "NAME" : "pytest_django_should_never_get_accessed" ,
1616 "HOST" : "localhost" ,
1717 "USER" : "" ,
1818 }
Original file line number Diff line number Diff line change 1- from .settings_base import * # noqa
1+ from .settings_base import * # noqa: F401 F403
22
33DATABASES = {
44 "default" : {
Original file line number Diff line number Diff line change 11import tempfile
22
3- from pytest_django_test .settings_base import * # noqa
3+ from .settings_base import * # noqa: F401 F403
44
55# This is a SQLite configuration, which uses a file based database for
66# tests (via setting TEST_NAME / TEST['NAME']).
1111DATABASES = {
1212 "default" : {
1313 "ENGINE" : "django.db.backends.sqlite3" ,
14- "NAME" : "/should_never_be_accessed " ,
14+ "NAME" : "/pytest_django_should_never_get_accessed " ,
1515 "TEST" : {"NAME" : _filename },
1616 }
1717}
You can’t perform that action at this time.
0 commit comments