def test__explodes_when_no_transaction_is_active(self): self.assertRaises( TransactionManagementError, validate_in_transaction, connection)