Skip to content

Commit

Permalink
Attempting to fix CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
btimby committed Sep 10, 2019
1 parent b127e21 commit 1bb5845
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ matrix:
env: DJANGO=1.6
- python: '3.5'
env: DJANGO=1.7
- python: '3.5'
env: DJANGO=2.1
- python: '3.5'
env: DJANGO=2.2
- python: '3.6'
env: DJANGO=1.4
- python: '3.6'
Expand All @@ -35,6 +39,10 @@ matrix:
env: DJANGO=1.6
- python: '3.6'
env: DJANGO=1.7
- python: '3.6'
env: DJANGO=2.1
- python: '3.6'
env: DJANGO=2.2
- python: '2.7'
env: DJANGO=2.0.5
install:
Expand Down
2 changes: 2 additions & 0 deletions django_proxysql/django_proxysql/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,5 @@
# https://docs.djangoproject.com/en/2.2/howto/static-files/

STATIC_URL = '/static/'

TEST_RUNNER = 'main.tests.NoDbTestRunner'
17 changes: 17 additions & 0 deletions django_proxysql/main/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@
from django.db import connection
from django.db.utils import DatabaseError, DEFAULT_DB_ALIAS

try:
from django.test.simple import DjangoTestSuiteRunner
except ImportError:
from django.test.runner import DiscoverRunner as DjangoTestSuiteRunner


class NoDbTestRunner(DjangoTestSuiteRunner):
""" A test runner to test without database creation """

def setup_databases(self, **kwargs):
""" Override the database creation defined in parent class """
pass

def teardown_databases(self, old_config, **kwargs):
""" Override the database teardown defined in parent class """
pass


class ProxySQLTestCase(SimpleTestCase):
@classmethod
Expand Down

0 comments on commit 1bb5845

Please sign in to comment.