mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
[2.2.x] Fixed #30111 -- Fixed AppRegistryNotReady error with django.contrib.postgres in INSTALLED_APPS.
Regression ine192223ed9. Backport of2804b8d215from master.
This commit is contained in:
committed by
Tim Graham
parent
51247bc55f
commit
6ce7887f13
5
tests/postgres_tests/integration_settings.py
Normal file
5
tests/postgres_tests/integration_settings.py
Normal file
@@ -0,0 +1,5 @@
|
||||
SECRET_KEY = 'abcdefg'
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.postgres',
|
||||
]
|
||||
17
tests/postgres_tests/test_integration.py
Normal file
17
tests/postgres_tests/test_integration.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from tests.postgres_tests import PostgreSQLSimpleTestCase
|
||||
|
||||
|
||||
class PostgresIntegrationTests(PostgreSQLSimpleTestCase):
|
||||
def test_check(self):
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
result = subprocess.run(
|
||||
[sys.executable, '-m', 'django', 'check', '--settings', 'integration_settings'],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.PIPE,
|
||||
)
|
||||
stderr = '\n'.join([e.decode() for e in result.stderr.splitlines()])
|
||||
self.assertEqual(result.returncode, 0, msg=stderr)
|
||||
Reference in New Issue
Block a user