Exemplo n.º 1
0
 def test_max_age_expiration(self):
     "Cookie will expire if max_age is provided"
     response = wsgi.WsgiResponse()
     response.set_cookie('max_age', max_age=10)
     max_age_cookie = response.cookies['max_age']
     self.assertEqual(max_age_cookie['max-age'], 10)
     self.assertEqual(max_age_cookie['expires'], cookie_date(time.time()+10))
Exemplo n.º 2
0
 def test_max_age_expiration(self):
     "Cookie will expire if max_age is provided"
     response = wsgi.WsgiResponse()
     response.set_cookie('max_age', max_age=10)
     max_age_cookie = response.cookies['max_age']
     self.assertEqual(max_age_cookie['max-age'], 10)
     self.assertEqual(max_age_cookie['expires'],
                      cookie_date(time.time()+10))