postgres db tests
This commit is contained in:
parent
75a00a1d65
commit
979c3d95ee
|
@ -0,0 +1,5 @@
|
|||
from django.db import models
|
||||
|
||||
|
||||
class Variable(models.Model):
|
||||
name = models.CharField(max_length=100, verbose_name='name')
|
|
@ -37,6 +37,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'bidon.bidon_app'
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
|
@ -100,3 +101,10 @@ USE_TZ = True
|
|||
# https://docs.djangoproject.com/en/1.8/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
|
||||
local_settings_file = os.environ.get(
|
||||
'BIDON_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py'))
|
||||
|
||||
if os.path.exists(local_settings_file):
|
||||
execfile(local_settings_file)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
import os
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'bidon_' + os.environ.get('JOB_NAME', '')
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
def test_true():
|
||||
def test_true(db):
|
||||
assert True
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue