MCPcopy
hub / github.com/django/django / assertTableExists

Method assertTableExists

tests/migrations/test_base.py:41–43  ·  view source on GitHub ↗
(self, table, using="default")

Source from the content-addressed store, hash-verified

39 return connections[using].introspection.get_table_description(cursor, table)
40
41 def assertTableExists(self, table, using="default"):
42 with connections[using].cursor() as cursor:
43 self.assertIn(table, connections[using].introspection.table_names(cursor))
44
45 def assertTableNotExists(self, table, using="default"):
46 with connections[using].cursor() as cursor:

Calls 2

cursorMethod · 0.80
table_namesMethod · 0.80

Tested by

no test coverage detected