#NEWLINE# def test_link_environment( self ) : #NEWLINE# #INDENT# '\n        ``_link_environment(link)`` returns a dictonary\n        with keys used by docker to represent links. Specifically\n        ``<alias>_PORT_<local_port>_<protocol>`` and the broken out variants\n        ``_ADDR``, ``_PORT`` and ``_PROTO``.\n        ' #NEWLINE# environment = _link_environment ( protocol = 'tcp' , alias = 'somealias' , local_port = 80 , hostname = 'the-host' , remote_port = 8080 ) #NEWLINE# self . assertEqual ( self , { #NEWLINE# #INDENT# 'SOMEALIAS_PORT_80_TCP' : 'tcp://the-host:8080' , #NEWLINE# 'SOMEALIAS_PORT_80_TCP_PROTO' : 'tcp' , #NEWLINE# 'SOMEALIAS_PORT_80_TCP_ADDR' : 'the-host' , #NEWLINE# 'SOMEALIAS_PORT_80_TCP_PORT' : '8080' , #NEWLINE# #UNINDENT# } )