#NEWLINE# def test_exclusive( self ) : #NEWLINE# #INDENT# d = { #NEWLINE# #INDENT# 'Cpu' : 1 , #NEWLINE# 'Environment' : [ { #NEWLINE# #INDENT# 'Name' : 'REGISTRY_STORAGE' , #NEWLINE# 'Value' : 's3' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'Name' : 'REGISTRY_STORAGE_S3_REGION' , #NEWLINE# 'Value' : 'eu-west-1' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'Essential' : True , #NEWLINE# 'Image' : 'registry:2' , #NEWLINE# 'Memory' : 500 , #NEWLINE# 'Name' : 'registry' , #NEWLINE# 'PortMappings' : [ { #NEWLINE# #INDENT# 'ContainerPort' : 5000 , #NEWLINE# 'HostPort' : 5000 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'ContainerPort' : 5001 , #NEWLINE# 'HostPort' : 5001 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# t = Template ( ) #NEWLINE# cd = ecs . ContainerDefinition . from_dict ( 'mycontainer' , self ) #NEWLINE# td = ecs . TaskDefinition ( 'taskdef' , ContainerDefinitions = [ cd ] , Volumes = [ ecs . Volume ( Name = 'myvol' ) ] ) #NEWLINE# t . add_resource ( td ) #NEWLINE# t . to_json ( )