MCPcopy
hub / github.com/django/django / test_memory_db_test_name

Method test_memory_db_test_name

tests/backends/sqlite/tests.py:73–86  ·  view source on GitHub ↗

A named in-memory db should be allowed where supported.

(self)

Source from the content-addressed store, hash-verified

71 connection.ops.check_expression_support(aggregate)
72
73 def test_memory_db_test_name(self):
74 """A named in-memory db should be allowed where supported."""
75 from django.db.backends.sqlite3.base import DatabaseWrapper
76
77 settings_dict = {
78 "TEST": {
79 "NAME": "file:memorydb_test?mode=memory&cache=shared",
80 }
81 }
82 creation = DatabaseWrapper(settings_dict).creation
83 self.assertEqual(
84 creation._get_test_db_name(),
85 creation.connection.settings_dict["TEST"]["NAME"],
86 )
87
88 def test_regexp_function(self):
89 tests = (

Callers

nothing calls this directly

Calls 2

DatabaseWrapperClass · 0.90
_get_test_db_nameMethod · 0.45

Tested by

no test coverage detected