'Assert the Domain is enabled.
:raise AssertionError: if domain is disabled.'

def assert_domain_enabled(self, domain_id, domain=None):

    if (domain is None):
        domain = self.get_domain(domain_id)
    if (not domain.get('enabled', True)):
        raise AssertionError((_('Domain    is    disabled:    %s') % domain_id))
