'An ``Application`` with ``Port`` objects is discovered from a ``Unit``
with exposed ``Portmap`` objects.'

def test_discover_application_with_ports(self):

    ports = [PortMap(internal_port=80, external_port=8080)]
    unit1 = UNIT_FOR_APP.set('ports', ports)
    units = {unit1.name: unit1}
    applications = [APP.set('ports', [Port(internal_port=80, external_port=8080)])]
    self._verify_discover_state_applications(units, applications)
