(self)
| 162 | DatabaseWrapper(settings).get_connection_params() |
| 163 | |
| 164 | def test_service_name(self): |
| 165 | from django.db.backends.postgresql.base import DatabaseWrapper |
| 166 | |
| 167 | settings = connection.settings_dict.copy() |
| 168 | settings["OPTIONS"] = {"service": "my_service"} |
| 169 | settings["NAME"] = "" |
| 170 | params = DatabaseWrapper(settings).get_connection_params() |
| 171 | self.assertEqual(params["service"], "my_service") |
| 172 | self.assertNotIn("database", params) |
| 173 | |
| 174 | def test_service_name_default_db(self): |
| 175 | # None is used to connect to the default 'postgres' db. |
nothing calls this directly
no test coverage detected