def test_static_preprocessors(self):
        current_file = filepath.FilePath(__file__)

        config = dict(
            routing = dict(
                __config__ = dict(
                    static = dict(
                        path = current_file.dirname(),
                        preprocessors = dict(
                            foo = "request: request.setHeader('foo', 'bar')"
                        )
                    )
                )
            )
        )

        web_site = self.getConfiguredWebSite(config)

        # send a request for this file:
        request = DummyRequest([current_file.basename()])
        resource = web_site.factory.getResourceFor(request)
        resource.render(request)

        self.assertEquals(request.responseHeaders.getRawHeaders('foo'), ['bar'])