Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Slowroll:Base:1
python-django-model-utils
use-sqlite.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File use-sqlite.patch of Package python-django-model-utils
commit e6833a2d52849e01dfeb3fe4a88093678fd88d93 Author: John Vandenberg <jayvdb@gmail.com> Date: Sun Dec 26 12:31:12 2021 +0800 Allow running tests using sqlite diff --git a/tests/settings.py b/tests/settings.py index 4ead542..83946b3 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -4,16 +4,25 @@ INSTALLED_APPS = ( 'model_utils', 'tests', ) -DATABASES = { - "default": { - "ENGINE": "django.db.backends.postgresql_psycopg2", - "NAME": os.environ.get("DB_NAME", "modelutils"), - "USER": os.environ.get("DB_USER", 'postgres'), - "PASSWORD": os.environ.get("DB_PASSWORD", ""), - "HOST": os.environ.get("DB_HOST", "localhost"), - "PORT": os.environ.get("DB_PORT", 5432) - }, -} + +if os.environ.get('SQLITE'): + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + }, + } +else: + DATABASES = { + "default": { + "ENGINE": "django.db.backends.postgresql_psycopg2", + "NAME": os.environ.get("DB_NAME", "modelutils"), + "USER": os.environ.get("DB_USER", 'postgres'), + "PASSWORD": os.environ.get("DB_PASSWORD", ""), + "HOST": os.environ.get("DB_HOST", "localhost"), + "PORT": os.environ.get("DB_PORT", 5432) + }, + } + SECRET_KEY = 'dummy' CACHES = {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor