MCPcopy
hub / github.com/django/django / test_pathlib_name

Method test_pathlib_name

tests/backends/sqlite/tests.py:104–115  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

102 self.assertIs(value, expected)
103
104 def test_pathlib_name(self):
105 with tempfile.TemporaryDirectory() as tmp:
106 settings_dict = {
107 "default": {
108 "ENGINE": "django.db.backends.sqlite3",
109 "NAME": Path(tmp) / "test.db",
110 },
111 }
112 connections = ConnectionHandler(settings_dict)
113 connections["default"].ensure_connection()
114 connections["default"].close()
115 self.assertTrue(os.path.isfile(os.path.join(tmp, "test.db")))
116
117 @mock.patch.object(connection, "get_database_version", return_value=(3, 36))
118 def test_check_database_version_supported(self, mocked_get_database_version):

Callers

nothing calls this directly

Calls 4

ConnectionHandlerClass · 0.90
ensure_connectionMethod · 0.80
closeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected