#NEWLINE# def test_assemblies_get( self ) : #NEWLINE# #INDENT# plan_resp = self . client . create_plan ( data = plan_sample_data ) #NEWLINE# self . assertEqual ( plan_resp . status , 201 ) #NEWLINE# plan_uuid = plan_resp . uuid #NEWLINE# assembly_resp = self . client . create_assembly ( plan_uuid = plan_uuid , data = sample_data ) #NEWLINE# self . assertEqual ( assembly_resp . status , 201 ) #NEWLINE# uuid = assembly_resp . uuid #NEWLINE# sample_data [ 'plan_uri' ] = ( '%s/v1/plans/%s' % ( self . client . base_url , plan_uuid ) ) #NEWLINE# ( resp , body ) = self . client . get ( ( 'v1/assemblies/%s' % uuid ) ) #NEWLINE# self . assertEqual ( resp . status , 200 ) #NEWLINE# json_data = json . loads ( body ) #NEWLINE# self . _assert_output_expected ( json_data , sample_data ) #NEWLINE# for k in [ 'plan_uri' , 'trigger_uri' ] : #NEWLINE# #INDENT# if ( k in sample_data ) : #NEWLINE# #INDENT# sample_data [ k ] = sample_data [ k ] . replace ( 'http:' , 'https:' , 1 ) #NEWLINE# #UNINDENT# #UNINDENT# use_https = { #NEWLINE# #INDENT# 'X-Forwarded-Proto' : 'https' , #NEWLINE# #UNINDENT# } #NEWLINE# ( resp , body ) = self . client . get ( ( 'v1/assemblies/%s' % uuid ) , headers = use_https ) #NEWLINE# self . assertEqual ( resp . status , 200 ) #NEWLINE# json_data = json . loads ( body ) #NEWLINE# self . _assert_output_expected ( json_data , sample_data )