#NEWLINE# def test_action_with_notify_crud( self ) : #NEWLINE# #INDENT# runnertype = self . _create_save_runnertype ( metadata = False ) #NEWLINE# saved = self . _create_save_action ( runnertype , metadata = False ) #NEWLINE# on_complete = NotificationSubSchema ( message = 'Action complete.' ) #NEWLINE# saved . notify = NotificationSchema ( on_complete = on_complete ) #NEWLINE# saved = Action . add_or_update ( saved ) #NEWLINE# retrieved = Action . get_by_id ( saved . id ) #NEWLINE# self . assertEqual ( runnertype . notify . on_complete . message , on_complete . message ) #NEWLINE# retrieved . notify = NotificationSchema ( on_complete = None ) #NEWLINE# saved = Action . add_or_update ( retrieved ) #NEWLINE# retrieved = Action . get_by_id ( saved . id ) #NEWLINE# self . assertEqual ( retrieved . notify . on_complete , None ) #NEWLINE# self . _delete ( [ retrieved ] ) #NEWLINE# try : #NEWLINE# #INDENT# retrieved = Action . get_by_id ( saved . id ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# retrieved = None #NEWLINE# #UNINDENT# self . assertIsNone ( retrieved , 'managed to retrieve after failure.' )