2019-01-23 06:49:30 +08:00
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
2019-01-23 23:20:25 +08:00
|
|
|
from . import PostgreSQLSimpleTestCase
|
2019-01-23 06:49:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
class PostgresIntegrationTests(PostgreSQLSimpleTestCase):
|
|
|
|
def test_check(self):
|
|
|
|
result = subprocess.run(
|
|
|
|
[sys.executable, '-m', 'django', 'check', '--settings', 'integration_settings'],
|
|
|
|
stdout=subprocess.DEVNULL,
|
|
|
|
stderr=subprocess.PIPE,
|
2019-02-06 00:01:36 +08:00
|
|
|
cwd=os.path.dirname(__file__),
|
2019-01-23 06:49:30 +08:00
|
|
|
)
|
|
|
|
stderr = '\n'.join([e.decode() for e in result.stderr.splitlines()])
|
|
|
|
self.assertEqual(result.returncode, 0, msg=stderr)
|