#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( Tender2LotContractDocumentResourceTest , self ) . setUp ( ) #NEWLINE# response = self . app . post_json ( '/tenders/{}/awards' . format ( self . tender_id ) , { #NEWLINE# #INDENT# 'data' : { #NEWLINE# #INDENT# 'suppliers' : [ test_organization ] , #NEWLINE# 'status' : 'pending' , #NEWLINE# 'bid_id' : self . initial_bids [ 0 ] [ 'id' ] , #NEWLINE# 'lotID' : self . initial_lots [ 0 ] [ 'id' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# award = response . json [ 'data' ] #NEWLINE# self . award_id = self [ 'id' ] #NEWLINE# self . app . patch_json ( '/tenders/{}/awards/{}' . format ( self . tender_id , self . award_id ) , { #NEWLINE# #INDENT# 'data' : { #NEWLINE# #INDENT# 'status' : 'active' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = self . app . post_json ( '/tenders/{}/contracts' . format ( self . tender_id ) , { #NEWLINE# #INDENT# 'data' : { #NEWLINE# #INDENT# 'title' : 'contract title' , #NEWLINE# 'description' : 'contract description' , #NEWLINE# 'awardID' : self . award_id , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# contract = response . json [ 'data' ] #NEWLINE# self . contract_id = contract [ 'id' ]