'Test that Domain Not Found is returned with invalid domain.
Call ``GET & HEAD /domains/{domain_id}/config/{group}/{opt_not_exist}``
While retrieving non-existent Identity API-based domain config option
with an invalid domain id provided, the request shall be rejected with
a response, 404 domain not found.'

def test_get_head_non_existant_config_option_with_invalid_domain(self):

    config = {'ldap': {'url': uuid.uuid4().hex}}
    self.domain_config_api.create_config(self.domain['id'], config)
    invalid_domain_id = uuid.uuid4().hex
    url = ('/domains/%(domain_id)s/config/ldap/user_tree_dn' % {'domain_id': invalid_domain_id})
    self.get(url, expected_status=exception.DomainNotFound.code)
    self.head(url, expected_status=exception.DomainNotFound.code)
