'Cookie will expire when an near expiration time is provided'

def test_near_expiration(self):

    response = HttpResponse()
    expires = (datetime.utcnow() + timedelta(seconds=10))
    time.sleep(0.001)
    response.set_cookie(u'datetime', expires=expires)
    datetime_cookie = response.cookies[u'datetime']
    self.assertEqual(datetime_cookie[u'max-age'], 10)
