'Test ephemeral user picking up the non-ephemeral user mapping.
Looking up the mapping with protocol Id \'x509\' will load up
the non-ephemeral user mapping, results unauthenticated.'

def test_ephemeral_incorrect_mapping_fail(self):

    env = {}
    env['SSL_CLIENT_I_DN'] = self.client_issuer
    env['HTTP_X_PROJECT_NAME'] = self.project_name
    env['HTTP_X_PROJECT_DOMAIN_NAME'] = self.domain_name
    env['SSL_CLIENT_USER_NAME'] = self.user['name']
    self.config_fixture.config(group='tokenless_auth', protocol='x509')
    self.protocol_id = 'x509'
    mapping = copy.deepcopy(mapping_fixtures.MAPPING_FOR_EPHEMERAL_USER)
    mapping['rules'][0]['local'][0]['group']['id'] = uuid.uuid4().hex
    self._load_mapping_rules(mapping)
    self._middleware_failure(exception.MappedGroupNotFound, extra_environ=env)
