-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebase remote/master -- moves history to branch 'to-not-lose-history'
- Loading branch information
1 parent
ed107a8
commit 1c2e97c
Showing
9 changed files
with
399 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright: See the LICENSE file. | ||
|
||
"""Settings for factory_boy/Django tests.""" | ||
|
||
import os | ||
|
||
from .settings import * # noqa: F401, F403 | ||
|
||
try: | ||
# pypy does not support `psycopg2` or `psycopg2-binary` | ||
# This is a package that only gets installed with pypy, and it needs to be | ||
# initialized for it to work properly. It mimic `psycopg2` 1-to-1 | ||
from psycopg2cffi import compat | ||
compat.register() | ||
except ImportError: | ||
pass | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', | ||
'NAME': os.environ.get('POSTGRES_DATABASE', 'factory_boy_test'), | ||
'USER': os.environ.get('POSTGRES_USER', 'postgres'), | ||
'PASSWORD': os.environ.get('POSTGRES_PASSWORD', 'password'), | ||
'HOST': os.environ.get('POSTGRES_HOST', 'localhost'), | ||
'PORT': os.environ.get('POSTGRES_PORT', '5432'), | ||
}, | ||
'replica': { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', | ||
'NAME': os.environ.get('POSTGRES_DATABASE', 'factory_boy_test') + '_rp', | ||
'USER': os.environ.get('POSTGRES_USER', 'postgres'), | ||
'PASSWORD': os.environ.get('POSTGRES_PASSWORD', 'password'), | ||
'HOST': os.environ.get('POSTGRES_HOST', 'localhost'), | ||
'PORT': os.environ.get('POSTGRES_PORT', '5432'), | ||
} | ||
} |
Oops, something went wrong.