summaryrefslogtreecommitdiff
path: root/tests/backends
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2022-12-06 11:37:25 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-12-06 12:48:16 +0100
commit6a2165816394ab4bb259f6171e82417e098e97a6 (patch)
tree3b0f7bb0f9c277ffd4978802e5267b23ae951083 /tests/backends
parent29b6a177d81b9a8d833529bebfc67ef48bda3c7f (diff)
downloaddjango-6a2165816394ab4bb259f6171e82417e098e97a6.tar.gz
Refs #33308 -- Modernized database wrapper in the PostgreSQL backend.
- Used connection.info instead of connection.get_parameter_status() and connection.server_info which don't exist in psycopg 3. - Set encoding using the client_encoding connection parameter instead of connection.set_client_encoding() that doesn't exist in psycopg 3. - Used the dbname connection parameter instead of deprecated alias - database.
Diffstat (limited to 'tests/backends')
-rw-r--r--tests/backends/postgresql/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/backends/postgresql/tests.py b/tests/backends/postgresql/tests.py
index e28acef2c0..f056162454 100644
--- a/tests/backends/postgresql/tests.py
+++ b/tests/backends/postgresql/tests.py
@@ -164,7 +164,7 @@ class Tests(TestCase):
settings["NAME"] = None
settings["OPTIONS"] = {"service": "django_test"}
params = DatabaseWrapper(settings).get_connection_params()
- self.assertEqual(params["database"], "postgres")
+ self.assertEqual(params["dbname"], "postgres")
self.assertNotIn("service", params)
def test_connect_and_rollback(self):