def test(webapp):
    f = urlopen(webapp.server.http.base)
    s = f.read()
    assert s == b"Hello World!"
    expires = f.headers["Expires"]
    diff = (mktime(parsedate(expires)) - mktime(datetime.utcnow().timetuple()))
    assert 60 - (60 * 0.1) < diff < 60 + (60 * 0.1)  # diff is about 60 +- 10%
dataset/ETHPy150Open circuits/circuits/tests/web/test_expires.py/test/original