'An ``Application`` with ``Environment`` objects is discovered from a
``Unit`` with ``Environment`` objects.'

def test_discover_application_with_environment(self):

    environment_variables = (('CUSTOM_ENV_A', 'a    value'), ('CUSTOM_ENV_B', 'something    else'))
    environment = Environment(variables=environment_variables)
    unit1 = UNIT_FOR_APP.set('environment', environment)
    units = {unit1.name: unit1}
    applications = [APP.set('environment', dict(environment_variables))]
    self._verify_discover_state_applications(units, applications)
