MCPcopy
hub / github.com/django/django / _fixture_teardown

Method _fixture_teardown

django/test/testcases.py:1492–1500  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1490 cls.setUpTestData()
1491
1492 def _fixture_teardown(self):
1493 if not self._databases_support_transactions():
1494 return super()._fixture_teardown()
1495 try:
1496 for db_name in reversed(self._databases_names()):
1497 if self._should_check_constraints(connections[db_name]):
1498 connections[db_name].check_constraints()
1499 finally:
1500 self._rollback_atomics(self.atomics)
1501
1502 def _should_check_constraints(self, connection):
1503 return (

Callers 2

testMethod · 0.45

Calls 5

_rollback_atomicsMethod · 0.95
_databases_namesMethod · 0.80
check_constraintsMethod · 0.45

Tested by

no test coverage detected