MCPcopy
hub / github.com/celery/celery / test_table_name_config

Method test_table_name_config

t/unit/backends/test_database.py:264–271  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

262 assert tb.taskset_cls.__table__.c.id.default.schema == 'bar'
263
264 def test_table_name_config(self):
265 self.app.conf.database_table_names = {
266 'task': 'foo',
267 'group': 'bar',
268 }
269 tb = DatabaseBackend(self.uri, app=self.app)
270 assert tb.task_cls.__table__.name == 'foo'
271 assert tb.taskset_cls.__table__.name == 'bar'
272
273 def test_table_creation_at_setup_config(self):
274 from sqlalchemy import inspect

Callers

nothing calls this directly

Calls 1

DatabaseBackendClass · 0.90

Tested by

no test coverage detected