#NEWLINE# def testDeleteSuperRestrict( self ) : #NEWLINE# #INDENT# ' Test delete_super with RESTRICT constraint ' #NEWLINE# s3db = current . s3db #NEWLINE# master_table = s3db . setest_master #NEWLINE# record = master_table [ component_id . master_id ] #NEWLINE# se_id = record . se_id #NEWLINE# component_table = s3db . setest_component_restrict #NEWLINE# component_id = component_table . insert ( se_id = se_id ) #NEWLINE# component_record = component_table [ component_id ] #NEWLINE# self . assertNotEqual ( component_record , None ) #NEWLINE# success = s3db . delete_super ( master_table , record ) #NEWLINE# self . assertFalse ( success ) #NEWLINE# record = master_table [ self . master_id ] #NEWLINE# self . assertEqual ( record . se_id , se_id ) #NEWLINE# component_record = component_table [ component_id ] #NEWLINE# self . assertFalse ( component_record . deleted ) #NEWLINE# self . assertEqual ( component_record . se_id , se_id ) #NEWLINE# super_table = s3db . setest_super #NEWLINE# super_record = super_table [ se_id ] #NEWLINE# self . assertFalse ( super_record . deleted )