'``FigConfiguration._parse_app_ports`` returns a ``list``
of ``Port`` objects mapping internal and external ports, given a
valid configuration.'

def test_valid_fig_config_ports(self):

    config = {u'postgres': {u'image': u'sample/postgres', u'ports': ['8080:80']}}
    parser = FigConfiguration(config)
    expected_result = [Port(internal_port=80, external_port=8080)]
    ports = parser._parse_app_ports(u'postgres', config[u'postgres'][u'ports'])
    self.assertEqual(expected_result, ports)
