Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Aug 12, 2018
1 parent 01edc04 commit 5759a21
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,11 @@ Testing
=======
Project is covered by test (functional- and browser-tests).

.. note::

You are recommended to use Postgres or MySQL for testing. Tests
occasionally fail on SQLite due to very intesive IO and table locking.

To test with all supported Python/Django versions type:

.. code-block:: sh
Expand All @@ -2309,7 +2314,7 @@ To test against specific environment, type:

.. code-block:: sh
tox -e pypy-django18
tox -e py37-django21
To test just your working environment type:

Expand Down
7 changes: 6 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,11 @@ Testing
=======
Project is covered by test (functional- and browser-tests).

.. note::

You are recommended to use Postgres or MySQL for testing. Tests
occasionally fail on SQLite due to very intesive IO and table locking.

To test with all supported Python/Django versions type:

.. code-block:: sh
Expand All @@ -2309,7 +2314,7 @@ To test against specific environment, type:

.. code-block:: sh
tox -e pypy-django18
tox -e py37-django21
To test just your working environment type:

Expand Down
6 changes: 6 additions & 0 deletions examples/simple/settings/local_settings.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from nine.versions import *


def gettext(s):
Expand Down Expand Up @@ -69,3 +70,8 @@ os.environ.setdefault(
'FOBI_SOURCE_PATH',
'/home/user/repose/django-fobi/src'
)

try:
from .loca_settings import TEST_DATABASES as DATABASES
except:
pass
10 changes: 10 additions & 0 deletions examples/simple/settings/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
}
}

# Conditionally choosing the right postgres engine
if DJANGO_GTE_1_11:
DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql'
else:
DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2'

# FeinCMS addons

Expand All @@ -107,3 +112,8 @@
'db_store': 'fobi.contrib.plugins.form_handlers.db_store.migrations',
'page': 'page.migrations',
}

try:
from .loca_settings import TEST_DATABASES as DATABASES
except:
pass

0 comments on commit 5759a21

Please sign in to comment.