mirror of
https://github.com/django/django.git
synced 2025-09-09 20:16:32 +00:00
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.
This commit is contained in:
parent
29b6a177d8
commit
6a21658163
2 changed files with 6 additions and 7 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue