import os

from django.urls import (
    include,
    path,
)

BASE_DIR = os.path.dirname(__file__)
STATIC_URL = "/static/"

INSTALLED_APPS = (
    'gcloudc',
    'djangae',
    'djangae.commands',  # Takes care of emulator setup
    'djangae.tasks',
)

DATABASES = {
    'default': {
        'ENGINE': 'gcloudc.db.backends.datastore',
        'INDEXES_FILE': os.path.join(os.path.abspath(os.path.dirname(__file__)), "djangaeidx.yaml"),
        "PROJECT": "test",
        "NAMESPACE": "ns1",  # Use a non-default namespace to catch edge cases where we forget
    }
}

SECRET_KEY = "secret_key_for_testing"

USE_TZ = True

CSRF_USE_SESSIONS = True

CLOUD_TASKS_LOCATION = "[LOCATION]"

# Define two required task queues
CLOUD_TASKS_QUEUES = [
    {
        "name": "default"
    },
    {
        "name": "another"
    }
]

# Point the URL conf at this file
ROOT_URLCONF = __name__

urlpatterns = [
    path('tasks/', include('djangae.tasks.urls')),
]

@@ -122,26 +122,496 @@
 /%22%0A%0A
-INSTALLED_APPS = (
+# Default Django middleware%0AMIDDLEWARE = %5B%0A    'django.middleware.security.SecurityMiddleware',%0A    'django.contrib.sessions.middleware.SessionMiddleware',%0A    'django.middleware.common.CommonMiddleware',%0A    'django.middleware.csrf.CsrfViewMiddleware',%0A    'django.contrib.messages.middleware.MessageMiddleware',%0A    'django.middleware.clickjacking.XFrameOptionsMiddleware',%0A    'djangae.tasks.middleware.task_environment_middleware',%0A%5D%0A%0AINSTALLED_APPS = (%0A    'django.contrib.sessions',
 %0A   

Set default Django middleware in test settings