MCPcopy
hub / github.com/django/django / assertForeignKeyNotExists

Method assertForeignKeyNotExists

tests/schema/tests.py:341–345  ·  view source on GitHub ↗
(self, model, column, expected_fk_table)

Source from the content-addressed store, hash-verified

339 self.assertEqual(constraint_fk, (expected_fk_table, field))
340
341 def assertForeignKeyNotExists(self, model, column, expected_fk_table):
342 if not connection.features.can_introspect_foreign_keys:
343 return
344 with self.assertRaises(AssertionError):
345 self.assertForeignKeyExists(model, column, expected_fk_table)
346
347 # Tests
348 def test_creation_deletion(self):

Calls 1

Tested by

no test coverage detected