summaryrefslogtreecommitdiff
path: root/tests/dbshell/test_postgresql.py
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-12-23 23:39:43 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-20 17:30:37 +0100
commitdcb3ad3319cad5c270a1856fd5f355e37cf9d474 (patch)
tree919ded9b849cb0a4ae66052c030f5bfb2e980d1a /tests/dbshell/test_postgresql.py
parentf054468cac325e8d8fa4d5934b939b93242a3730 (diff)
downloaddjango-dcb3ad3319cad5c270a1856fd5f355e37cf9d474.tar.gz
Fixed #32292 -- Added support for connection by service name to PostgreSQL.
Diffstat (limited to 'tests/dbshell/test_postgresql.py')
-rw-r--r--tests/dbshell/test_postgresql.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/dbshell/test_postgresql.py b/tests/dbshell/test_postgresql.py
index ccf49d7e50..e9eb131db7 100644
--- a/tests/dbshell/test_postgresql.py
+++ b/tests/dbshell/test_postgresql.py
@@ -67,6 +67,12 @@ class PostgreSqlDbshellCommandTestCase(SimpleTestCase):
)
)
+ def test_service(self):
+ self.assertEqual(
+ self.settings_to_cmd_args_env({'OPTIONS': {'service': 'django_test'}}),
+ (['psql', 'postgres'], {'PGSERVICE': 'django_test'}),
+ )
+
def test_column(self):
self.assertEqual(
self.settings_to_cmd_args_env({