Beispiel #1
0
    def test_that_blacklisted_cookies_arent_stored(self):
        middleware = CentaurMiddleware()

        factory = RequestFactory()
        factory.cookies["sessionid"] = "12345"
        factory.cookies["bananas"] = "yummy"
        factory.cookies["x"] = "test"
        request = factory.get("/")

        try:
            raise TypeError()  #Generate an exception with a traceback
        except TypeError, e:
            exception = e