Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Mar 22, 2024
1 parent 1fd49ac commit fa76331
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 30 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ jobs:

- name: Do quickstart
run: |
# copy default conf
cp .env.example .env
# start the stack
docker compose --profile testing_conformance up --build -d
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ jobs:

- name: Setup Compose
run: |
# copy default conf
cp .env.example .env
# start the stack
docker compose --profile testing_integration up --build -d
Expand Down
2 changes: 1 addition & 1 deletion tests/django_oapif_tests/tests/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@


class TestsConfig(AppConfig):
default_auto_field = "django_oapif_tests.db.models.BigAutoField"
default_auto_field = "django.db.models.BigAutoField"
name = "tests"
44 changes: 22 additions & 22 deletions tests/django_oapif_tests/tests/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Django settings for OAPIF tests project.
Generated by 'django_oapif_tests-admin startproject' using Django 4.1.1.
Generated by 'django-admin startproject' using Django 4.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/4.1/topics/settings/
Expand Down Expand Up @@ -52,42 +52,42 @@

MIDDLEWARE = [
"debug_toolbar.middleware.DebugToolbarMiddleware",
"django_oapif_tests.middleware.security.SecurityMiddleware",
"django_oapif_tests.contrib.sessions.middleware.SessionMiddleware",
"django_oapif_tests.middleware.common.CommonMiddleware",
"django_oapif_tests.middleware.csrf.CsrfViewMiddleware",
"django_oapif_tests.contrib.auth.middleware.AuthenticationMiddleware",
"django_oapif_tests.contrib.messages.middleware.MessageMiddleware",
"django_oapif_tests.middleware.clickjacking.XFrameOptionsMiddleware",
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]

ROOT_URLCONF = "tests.urls"
ROOT_URLCONF = "django_oapif_tests.tests.urls"

TEMPLATES = [
{
"BACKEND": "django_oapif_tests.template.backends.django_oapif_tests.DjangoTemplates",
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django_oapif_tests.template.context_processors.debug",
"django_oapif_tests.template.context_processors.request",
"django_oapif_tests.contrib.auth.context_processors.auth",
"django_oapif_tests.contrib.messages.context_processors.messages",
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]

WSGI_APPLICATION = "tests.wsgi.application"
WSGI_APPLICATION = "django_oapif_tests.tests.wsgi.application"


# Database
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases

DATABASES = {
"default": {
"ENGINE": "django_oapif_tests.contrib.gis.db.backends.postgis",
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": os.getenv("POSTGRES_DB"),
"HOST": os.getenv("POSTGRES_HOST"),
"PORT": os.getenv("POSTGRES_PORT"),
Expand All @@ -102,16 +102,16 @@

AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django_oapif_tests.contrib.auth.password_validation.UserAttributeSimilarityValidator",
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "django_oapif_tests.contrib.auth.password_validation.MinimumLengthValidator",
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
"NAME": "django_oapif_tests.contrib.auth.password_validation.CommonPasswordValidator",
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
"NAME": "django_oapif_tests.contrib.auth.password_validation.NumericPasswordValidator",
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]

Expand Down Expand Up @@ -141,7 +141,7 @@
# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = "django_oapif_tests.db.models.BigAutoField"
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

# Django REST Framework
REST_FRAMEWORK = {
Expand All @@ -151,7 +151,7 @@
"rest_framework.authentication.SessionAuthentication",
# "geocity.auth.InternalTokenAuthentication",
),
"DEFAULT_PAGINATION_CLASS": "core.pagination.OapifPagination",
"DEFAULT_PAGINATION_CLASS": "django_oapif.pagination.OapifPagination",
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly",),
# "DEFAULT_THROTTLE_CLASSES": [
# "rest_framework.throttling.ScopedRateThrottle",
Expand Down
2 changes: 1 addition & 1 deletion tests/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
DJANGO_DEBUG: "true"
volumes:
# mounting the source code for live reloading
- .:/usr/src
- ..:/usr/src
# mounting directory to hold unit tests outputs
- ./unit_tests_outputs/:/unit_tests_outputs
ports:
Expand Down

0 comments on commit fa76331

Please sign in to comment.