Example #1
0
 def test_attribute(self):
     """The cookie should get set if the _db_write attribute is True."""
     res = HttpResponse()
     res._db_write = True
     response = self.middleware.process_response(self.request, res)
     assert PINNING_COOKIE in response.cookies
 def test_attribute(self):
     """The cookie should get set if the _db_write attribute is True."""
     res = HttpResponse()
     res._db_write = True
     response = self.middleware.process_response(self.request, res)
     assert PINNING_COOKIE in response.cookies
Example #3
0
 def test_attribute(self):
     """The cache should get set if the _db_write attribute is True."""
     res = HttpResponse()
     res._db_write = True
     self.middleware.process_response(self.request, res)
     assert cache.get(self.cache_key) is not None