def test_constructorRequestFactory(self):
        """
        Can be initialized with a custom requestFactory.
        """
        customFactory = object()

        site = server.Site(
            resource=SimpleResource(), requestFactory=customFactory)

        self.assertIs(customFactory, site.requestFactory)

        Can be initialized with a custom requestFactory.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_web.py