'Cookie will expire if max_age is provided'

def test_max_age_expiration(self):

    response = HttpResponse()
    response.set_cookie(u'max_age', max_age=10)
    max_age_cookie = response.cookies[u'max_age']
    self.assertEqual(max_age_cookie[u'max-age'], 10)
    self.assertEqual(max_age_cookie[u'expires'], cookie_date((time.time() + 10)))
