MCPcopy
hub / github.com/django/django / test_database_name_empty

Method test_database_name_empty

tests/backends/postgresql/tests.py:152–162  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

150 DatabaseWrapper(settings).get_connection_params()
151
152 def test_database_name_empty(self):
153 from django.db.backends.postgresql.base import DatabaseWrapper
154
155 settings = connection.settings_dict.copy()
156 settings["NAME"] = ""
157 msg = (
158 "settings.DATABASES is improperly configured. Please supply the "
159 "NAME or OPTIONS['service'] value."
160 )
161 with self.assertRaisesMessage(ImproperlyConfigured, msg):
162 DatabaseWrapper(settings).get_connection_params()
163
164 def test_service_name(self):
165 from django.db.backends.postgresql.base import DatabaseWrapper

Callers

nothing calls this directly

Calls 4

DatabaseWrapperClass · 0.90
assertRaisesMessageMethod · 0.80
copyMethod · 0.45
get_connection_paramsMethod · 0.45

Tested by

no test coverage detected