'Test that protocol remote_id_attribute has higher priority.
Make sure the parameter stored under ``protocol`` section has higher
priority over parameter from default ``federation`` configuration
section.'

def test_issue_unscoped_token_with_remote_default_overwritten(self):

    self.config_fixture.config(group='saml2', remote_id_attribute=self.REMOTE_ID_ATTR)
    self.config_fixture.config(group='federation', remote_id_attribute=uuid.uuid4().hex)
    r = self._issue_unscoped_token(idp=self.IDP_WITH_REMOTE, environment={self.REMOTE_ID_ATTR: self.REMOTE_IDS[0]})
    self.assertIsNotNone(r.headers.get('X-Subject-Token'))
