testing.py 930 Bytes
Newer Older
1
2
3
4
5
6
"""
Settings for CI testing

This file is loaded by __init__.py if GITLAB_CI is set in the environment
"""

Thom Wiggers's avatar
Thom Wiggers committed
7
8
9
10
import logging

from .settings import INSTALLED_APPS, MIDDLEWARE

Wietse Kuipers's avatar
Wietse Kuipers committed
11
12
13
14
15
16
17
18
19
20
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'thalia',
        'USER': 'postgres',
        'PASSWORD': '',
        'HOST': 'postgres',
        'PORT': 5432,
    },
}
Thom Wiggers's avatar
Thom Wiggers committed
21
22
23
24
25
26
27
28
29
30
31
32


# This won't help anyway
DEBUG = False
logging.disable(logging.CRITICAL)

# Fasters hashing
PASSWORD_HASHERS = (
    'django.contrib.auth.hashers.MD5PasswordHasher',
)

# Strip unneeded apps
33
_ = [INSTALLED_APPS.remove(x) for x in (
Thom Wiggers's avatar
Thom Wiggers committed
34
35
36
37
    'corsheaders',
)]

# Strip unneeded middlewares
38
_ = [MIDDLEWARE.remove(x) for x in (
Thom Wiggers's avatar
Thom Wiggers committed
39
40
41
42
43
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.http.ConditionalGetMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)]