kopia lustrzana https://github.com/wagtail/wagtail
Add --disabletimezone option to runtests.py
rodzic
0f637a22de
commit
43cb1f7811
|
@ -20,6 +20,7 @@ def make_parser():
|
||||||
parser.add_argument('--elasticsearch6', action='store_true')
|
parser.add_argument('--elasticsearch6', action='store_true')
|
||||||
parser.add_argument('--elasticsearch7', action='store_true')
|
parser.add_argument('--elasticsearch7', action='store_true')
|
||||||
parser.add_argument('--emailuser', action='store_true')
|
parser.add_argument('--emailuser', action='store_true')
|
||||||
|
parser.add_argument('--disabletimezone', action='store_true')
|
||||||
parser.add_argument('--bench', action='store_true')
|
parser.add_argument('--bench', action='store_true')
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
@ -70,6 +71,9 @@ def runtests():
|
||||||
if args.emailuser:
|
if args.emailuser:
|
||||||
os.environ['USE_EMAIL_USER_MODEL'] = '1'
|
os.environ['USE_EMAIL_USER_MODEL'] = '1'
|
||||||
|
|
||||||
|
if args.disabletimezone:
|
||||||
|
os.environ['DISABLE_TIMEZONE'] = '1'
|
||||||
|
|
||||||
if args.bench:
|
if args.bench:
|
||||||
benchmarks = [
|
benchmarks = [
|
||||||
'wagtail.admin.tests.benches',
|
'wagtail.admin.tests.benches',
|
||||||
|
|
|
@ -46,7 +46,7 @@ STATICFILES_FINDERS = (
|
||||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
)
|
)
|
||||||
|
|
||||||
USE_TZ = True
|
USE_TZ = not os.environ.get('DISABLE_TIMEZONE')
|
||||||
|
|
||||||
LANGUAGE_CODE = "en"
|
LANGUAGE_CODE = "en"
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue