def test_image_can_be_get_from_nginx_with_utctimestamp():
    tempdir = tempfile.mkdtemp()
    r = redis.StrictRedis(host=os.getenv("REDIS_HOST", 'localhost'), port=int(os.getenv("REDIS_PORT", 7000)), db=0)
    r.delete("thumb/channel")
    utcnow = int(time.mktime(datetime.datetime.utcnow().timetuple()))
    p = run_broadcaster(tempdir, envs={"REDIS_SAMPLE_RATE": "1"})
    create_image(tempdir, "channel", "JPEG IMAGE")
    create_image(tempdir, "channel", "NEW JPEG IMAGE")
    p.terminate()
    assert get("/snapshot/channel?utc=%d" % (utcnow - 1)).read() == "JPEG IMAGE"
    assert get("/snapshot/channel").read() == "NEW JPEG IMAGE"
dataset/ETHPy150Open jbochi/live_thumb/tests/test_integration.py/test_image_can_be_get_from_nginx_with_utctimestamp/original