summaryrefslogtreecommitdiff
path: root/tests/contenttypes_tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-02-10 08:19:32 -0500
committerGitHub <noreply@github.com>2017-02-10 08:19:32 -0500
commitab83d4d8fe76c2c6bc3b0a96aa2baed9c9f07f19 (patch)
tree6564a7f124afe5fd99173f1cbe6c8d1762b2fd90 /tests/contenttypes_tests
parentbece837829eafbc22f2598dadf82c9a8364b085a (diff)
Added multi_db=True to test cases that access the 'other' db connection.
Fixed a failure in the context processors tests when running in reverse on MySQL due to an extra query after refs #27683.
Diffstat (limited to 'tests/contenttypes_tests')
-rw-r--r--tests/contenttypes_tests/test_models.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/contenttypes_tests/test_models.py b/tests/contenttypes_tests/test_models.py
index a9361c262f..34545e981d 100644
--- a/tests/contenttypes_tests/test_models.py
+++ b/tests/contenttypes_tests/test_models.py
@@ -1,7 +1,6 @@
from django.contrib.contenttypes.models import ContentType, ContentTypeManager
from django.contrib.contenttypes.views import shortcut
from django.contrib.sites.shortcuts import get_current_site
-from django.db import connections
from django.http import Http404, HttpRequest
from django.test import TestCase, override_settings
@@ -259,14 +258,7 @@ class TestRouter:
@override_settings(DATABASE_ROUTERS=[TestRouter()])
class ContentTypesMultidbTests(TestCase):
-
- def setUp(self):
- # When a test starts executing, only the "default" database is
- # connected. Connect to the "other" database here because otherwise it
- # will be connected later when it's queried. Some database backends
- # perform extra queries upon connecting (MySQL executes
- # "SET SQL_AUTO_IS_NULL = 0"), which will affect assertNumQueries().
- connections['other'].ensure_connection()
+ multi_db = True
def test_multidb(self):
"""