#NEWLINE# def test_generate_returns_error_if_date_can_not_be_parsed( self ) : #NEWLINE# #INDENT# result = SettlementBatchSummary . generate ( 'THIS AINT NO DATE' ) #NEWLINE# self . assertFalse ( result . is_success ) #NEWLINE# code = result . errors . for_object ( 'settlement_batch_summary' ) . on ( 'settlement_date' ) [ 0 ] . code #NEWLINE# self . assertEquals ( ErrorCodes . SettlementBatchSummary . SettlementDateIsInvalid , code )