def test_nocache(webapp):
    f = urlopen(webapp.server.http.base % "%s/nocache")
    s = f.read()
    assert s == b"Hello World!"

    expires = f.headers["Expires"]
    pragma = f.headers["Pragma"]
    cacheControl = f.headers["Cache-Control"]

    now = datetime.utcnow()
    lastyear = now.replace(year=now.year - 1)

    diff = (mktime(parsedate(expires)) - mktime(lastyear.utctimetuple()))
    assert diff < 1.0

    assert pragma == "no-cache"
    assert cacheControl == "no-cache, must-revalidate"
dataset/ETHPy150Open circuits/circuits/tests/web/test_expires.py/test_nocache/swapped operands of `%`