Commit c6e6d4ee authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Defined available_apps in relevant tests.

Fixed #20483.
parent 4daf570b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -5,7 +5,16 @@ from django.utils.module_loading import import_by_path
from django.utils.unittest import SkipTest
from django.utils.translation import ugettext as _


class AdminSeleniumWebDriverTestCase(LiveServerTestCase):

    available_apps = [
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.sites',
    ]
    webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver'

    @classmethod
+8 −0
Original line number Diff line number Diff line
@@ -8,10 +8,18 @@ from django.test import TransactionTestCase
from django.test.utils import override_settings


# This must be a TransactionTestCase because the WSGI auth handler performs
# its own transaction management.
class ModWsgiHandlerTestCase(TransactionTestCase):
    """
    Tests for the mod_wsgi authentication handler
    """

    available_apps = [
        'django.contrib.auth',
        'django.contrib.contenttypes',
    ]

    @skipIfCustomUser
    def test_check_password(self):
        """
+7 −0
Original line number Diff line number Diff line
@@ -1474,6 +1474,13 @@ class ArgumentOrder(AdminScriptTestCase):

class StartProject(LiveServerTestCase, AdminScriptTestCase):

    available_apps = [
        'admin_scripts',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
    ]

    def test_wrong_args(self):
        "Make sure passing the wrong kinds of arguments raises a CommandError"
        out, err = self.run_django_admin(['startproject'])
+7 −0
Original line number Diff line number Diff line
@@ -345,6 +345,8 @@ class PostgresNewConnectionTest(TestCase):
# connection would implicitly rollback and cause problems during teardown.
class ConnectionCreatedSignalTest(TransactionTestCase):

    available_apps = []

    # Unfortunately with sqlite3 the in-memory test database cannot be closed,
    # and so it cannot be re-opened during testing.
    @skipUnlessDBFeature('test_db_allows_multiple_connections')
@@ -514,6 +516,8 @@ class BackendTestCase(TestCase):
# verify if its type is django.database.db.IntegrityError.
class FkConstraintsTests(TransactionTestCase):

    available_apps = ['backends']

    def setUp(self):
        # Create a Reporter.
        self.r = models.Reporter.objects.create(first_name='John', last_name='Smith')
@@ -777,6 +781,9 @@ class MySQLPKZeroTests(TestCase):


class DBConstraintTestCase(TransactionTestCase):

    available_apps = ['backends']

    def test_can_reference_existant(self):
        obj = models.Object.objects.create()
        ref = models.ObjectReference.objects.create(obj=obj)
+3 −0
Original line number Diff line number Diff line
@@ -686,6 +686,9 @@ class ModelTest(TestCase):


class ConcurrentSaveTests(TransactionTestCase):

    available_apps = ['basic']

    @skipUnlessDBFeature('test_db_allows_multiple_connections')
    def test_concurrent_delete_with_save(self):
        """
Loading