'Test \'standard\' workflow for granting access tokens.
* Issue unscoped token
* List available projects based on groups
* Scope token to one of available projects'

def test_full_workflow(self):

    r = self._issue_unscoped_token()
    token_resp = r.json_body['token']
    self.assertListEqual(['saml2'], token_resp['methods'])
    self.assertValidMappedUser(token_resp)
    employee_unscoped_token_id = r.headers.get('X-Subject-Token')
    r = self.get('/auth/projects', token=employee_unscoped_token_id)
    projects = r.result['projects']
    random_project = random.randint(0, (len(projects) - 1))
    project = projects[random_project]
    v3_scope_request = self._scope_request(employee_unscoped_token_id, 'project', project['id'])
    r = self.v3_create_token(v3_scope_request)
    token_resp = r.result['token']
    self.assertIn('token', token_resp['methods'])
    self.assertIn('saml2', token_resp['methods'])
    self._check_project_scoped_token_attributes(token_resp, project['id'])
