(self, request, domain)
Retrieve a resource corresponding to a :obj:`IAPIDomainMock` for the
        named domain.
Retrieve a resource corresponding to a :obj:`IAPIDomainMock` for the
        named domain.
Retrieve a resource corresponding to a : obj : IAPIDomainMock for the named domain .
def get_domain_resource(self, request, domain):
        """
        Retrieve a resource corresponding to a :obj:`IAPIDomainMock` for the
        named domain.
        """
        for mock in self.core.domains:
            if mock.domain() == domain:
                request.setResponseCode(200)
                return mock.resource()
        else:
            request.setResponseCode(404)
            request.setHeader(b"content-type", b"text/plain; charset=utf-8")
            return b"No such domain."
def get_domain_resource ( self , request , domain ) : for mock in self . core . domains : if mock . domain ( ) == domain : request . setResponseCode ( 200 ) return mock . resource ( ) else : request . setResponseCode ( 404 ) request . setHeader ( b"content-type" , b"text/plain; charset=utf-8" ) return b"No such domain."