diff options
| author | Nasir Hussain <nasirhjafri@gmail.com> | 2019-01-23 03:49:30 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-22 17:50:00 -0500 |
| commit | 6ce7887f1387855df2cda180da08277febedd02e (patch) | |
| tree | cc20f6e2d9f2983fc368547d480f8d5e38ce3d82 /tests/postgres_tests | |
| parent | 51247bc55f862c01bde60da6c07d9610bfe94835 (diff) | |
[2.2.x] Fixed #30111 -- Fixed AppRegistryNotReady error with django.contrib.postgres in INSTALLED_APPS.
Regression in e192223ed996ed30fe83787efdfa7f2be6b1a2ee.
Backport of 2804b8d2153505ec49b191db2168302dfb92c3af from master.
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/integration_settings.py | 5 | ||||
| -rw-r--r-- | tests/postgres_tests/test_integration.py | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/postgres_tests/integration_settings.py b/tests/postgres_tests/integration_settings.py new file mode 100644 index 0000000000..c4ec0d1157 --- /dev/null +++ b/tests/postgres_tests/integration_settings.py @@ -0,0 +1,5 @@ +SECRET_KEY = 'abcdefg' + +INSTALLED_APPS = [ + 'django.contrib.postgres', +] diff --git a/tests/postgres_tests/test_integration.py b/tests/postgres_tests/test_integration.py new file mode 100644 index 0000000000..829b862027 --- /dev/null +++ b/tests/postgres_tests/test_integration.py @@ -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) |
