Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make quicktest command compatible with django 1.3 #23

Merged
merged 1 commit into from

2 participants

Michel Sabchuk Eric Holscher
Michel Sabchuk

Fix the issue:20 - make quicktest command compatible with django 1.3 by changing the imports on the keep_database.py module.

Michel Sabchuk Make quicktest command compatible with django1.3 by changing the impo…
…rts on the keep_database.py module.
fda91f2
Michel Sabchuk

BTW: I tested against django 1.2.4 without errors too.

Eric Holscher ericholscher merged commit ea002fa into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 16, 2011
  1. Make quicktest command compatible with django1.3 by changing the impo…

    Michel Sabchuk authored
    …rts on the keep_database.py module.
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 2 deletions.
  1. +11 −2 test_utils/test_runners/keep_database.py
13 test_utils/test_runners/keep_database.py
View
@@ -1,4 +1,13 @@
-from django.test.simple import *
+from django.test import TestCase
+from django.test.simple import build_test, reorder_suite, build_suite
+from django.test.utils import setup_test_environment, teardown_test_environment
+from django.test.testcases import connections_support_transactions
+from django.db.models import get_app, get_apps
+from django.conf import settings
+try:
+ from django.utils import unittest # django's 1.3 copy of unittest2
+except ImportError:
+ import unittest # system fallback
import os
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
@@ -76,7 +85,7 @@ def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
else:
connection.close()
- settings.DATABASES['default']['SUPPORTS_TRANSACTIONS'] = connection.creation._rollback_works()
+ settings.DATABASES['default']['SUPPORTS_TRANSACTIONS'] = connections_support_transactions()
result = unittest.TextTestRunner(verbosity=verbosity).run(suite)
Something went wrong with that request. Please try again.