#NEWLINE# def test_integrity_checks_on_update( self ) : #NEWLINE# #INDENT# '\n        Try to update a model instance introducing a FK constraint violation.\n        If it fails it should fail with IntegrityError.\n        ' #NEWLINE# models . Article . objects . create ( headline = 'Test article' , pub_date = datetime . datetime ( 2010 , 9 , 4 ) , reporter = self . r ) #NEWLINE# a = models . Article . objects . get ( headline = 'Test article' ) #NEWLINE# a . reporter_id = 30 #NEWLINE# try : #NEWLINE# #INDENT# a . save ( ) #NEWLINE# #UNINDENT# except IntegrityError : #NEWLINE# #INDENT# pass