'Issue a request for an authentication-protected resource using valid
credentials and then return the C{DummyRequest} instance which was
used.
This is a helper for tests about the behavior of the logout
callback.'

def _logoutTest(self):

    self.credentialFactories.append(BasicCredentialFactory('example.com'))
    class SlowerResource(Resource, ):
        def render(self, request):
            return NOT_DONE_YET
    self.avatar.putChild(self.childName, SlowerResource())
    request = self.makeRequest([self.childName])
    child = self._authorizedBasicLogin(request)
    request.render(child)
    self.assertEqual(self.realm.loggedOut, 0)
    return request
