Skip to content

Commit b55bbc1

Browse files
committed
added pytest-django, added settings for pytest
1 parent 78d50ad commit b55bbc1

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

django/docker/django/requirements/02.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pylint-django==2.0.13
4242
pylint-plugin-utils==0.6
4343
pyparsing==2.4.6
4444
pytest==5.3.5
45+
pytest-django==3.9.0
4546
pytz==2019.3
4647
requests==2.23.0
4748
Rx==1.6.1

django/main/settings_tests.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from .settings import *
2+
3+
SECRET_KEY = "#7r1uf5su86d($ita6venjygkru5zfe0)bkj68x0e8*)w6nar6"
4+
DEBUG = True
5+
USE_HTTPS = False
6+
7+
DATABASES = {
8+
'default': {
9+
'ENGINE': 'django.contrib.gis.db.backends.postgis',
10+
'NAME': 'webui-tests ',
11+
'USER': os.getenv('DJANGO_DB_USER'),
12+
'PASSWORD': os.getenv('DJANGO_DB_PASSWORD'),
13+
'HOST': os.getenv('DJANGO_DB_HOST', 'pdb'),
14+
'PORT': '5432',
15+
'CONN_MAX_AGE': 600,
16+
# 'OPTIONS': {'autocommit': True}
17+
}
18+
}
19+
20+
SAVE_SCREENSHOT_ENABLED = False

django/pytest.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pytest]
2+
DJANGO_SETTINGS_MODULE = main.settings_tests
3+
python_files = tests.py test_*.py *_tests.py

0 commit comments

Comments
 (0)