'When constraint checks are disabled, should be able to write bad data
without IntegrityErrors.'

def test_disable_constraint_checks_manually(self):

    with transaction.atomic():
        Article.objects.create(headline='Test    article', pub_date=datetime.datetime(2010, 9, 4), reporter=self.r)
        a = Article.objects.get(headline='Test    article')
        a.reporter_id = 30
        try:
            connection.disable_constraint_checking()
            a.save()
            connection.enable_constraint_checking()
        except IntegrityError:
            self.fail('IntegrityError    should    not    have    occurred.')
        transaction.set_rollback(True)
