'``_link_environment(link)`` returns a dictonary
with keys used by docker to represent links. Specifically
``<alias>_PORT_<local_port>_<protocol>`` and the broken out variants
``_ADDR``, ``_PORT`` and ``_PROTO``.'

def test_link_environment(self):

    environment = _link_environment(protocol='tcp', alias='somealias', local_port=80, hostname=u'the-host', remote_port=8080)
    self.assertEqual(environment, {u'SOMEALIAS_PORT_80_TCP': u'tcp://the-host:8080', u'SOMEALIAS_PORT_80_TCP_PROTO': u'tcp', u'SOMEALIAS_PORT_80_TCP_ADDR': u'the-host', u'SOMEALIAS_PORT_80_TCP_PORT': u'8080'})
