'``FigConfiguration._parse_app_links`` creates a ``dict`` mapping
linked application names and aliases to each application, given a
valid configuration.'

def test_valid_fig_config_links(self):

    config = {u'postgres': {u'image': u'sample/postgres', u'volumes': [u'/var/db/data']}, u'wordpress': {u'image': u'sample/wordpress', u'links': ['postgres:db']}}
    parser = FigConfiguration(config)
    parser._application_links[u'wordpress'] = []
    parser._parse_app_links(u'wordpress', config[u'wordpress'][u'links'])
    expected_result = {u'wordpress': [{u'alias': u'db', u'target_application': u'postgres'}]}
    self.assertEqual(expected_result, parser._application_links)
