diff options
author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-12-23 23:39:43 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-20 17:30:37 +0100 |
commit | dcb3ad3319cad5c270a1856fd5f355e37cf9d474 (patch) | |
tree | 919ded9b849cb0a4ae66052c030f5bfb2e980d1a /tests/dbshell/test_postgresql.py | |
parent | f054468cac325e8d8fa4d5934b939b93242a3730 (diff) | |
download | django-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.py | 6 |
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({ |