From dcb3ad3319cad5c270a1856fd5f355e37cf9d474 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Wed, 23 Dec 2020 23:39:43 +0100 Subject: Fixed #32292 -- Added support for connection by service name to PostgreSQL. --- tests/dbshell/test_postgresql.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/dbshell/test_postgresql.py') 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({ -- cgit v1.2.1