Refactored and added pytest.ini file

This commit is contained in:
Thu Trang Pham
2020-11-01 07:30:51 -08:00
parent 3c47e66ca1
commit a63d4292b1
9 changed files with 74 additions and 33 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproject.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_project.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
@@ -1,5 +1,5 @@
"""
Django settings for testproject project.
Django settings for test_project project.
Generated by 'django-admin startproject' using Django 3.0.10.
@@ -15,7 +15,6 @@ import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
@@ -40,7 +39,7 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'market',
'tests.market',
]
MIDDLEWARE = [
@@ -53,7 +52,7 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'testproject.urls'
ROOT_URLCONF = 'tests.test_project.urls'
TEMPLATES = [
{
@@ -71,7 +70,7 @@ TEMPLATES = [
},
]
WSGI_APPLICATION = 'testproject.wsgi.application'
WSGI_APPLICATION = 'tests.test_project.wsgi.application'
# Database
@@ -2,6 +2,6 @@ import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproject.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_project.settings')
application = get_wsgi_application()