'Assert the project is enabled and its associated domain is enabled.
:raise AssertionError: if the project or domain is disabled.'

def assert_project_enabled(self, project_id, project=None):

    if (project is None):
        project = self.get_project(project_id)
    if project['domain_id']:
        self.assert_domain_enabled(domain_id=project['domain_id'])
    if (not project.get('enabled', True)):
        raise AssertionError((_('Project    is    disabled:    %s') % project_id))
