'The response code and message can be set by the request object passed to
a distributed resource\'s C{render} method.'

def test_requestResponseCodeMessage(self):

    class SetResponseCode(resource.Resource, ):
        def render(self, request):
            request.setResponseCode(200, 'some-message')
            return ''
    request = self._requestAgentTest(SetResponseCode())
    def cbRequested(result):
        self.assertEqual(result[0].data, '')
        self.assertEqual(result[1].code, 200)
        self.assertEqual(result[1].phrase, 'some-message')
    request.addCallback(cbRequested)
    return request
