def test_image_is_posted_to_redis_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")
    now = int(time.mktime(datetime.datetime.utcnow().timetuple()))
    p = run_broadcaster(tempdir, envs={"REDIS_SAMPLE_RATE": "1"})
    create_image(tempdir, "channel", "JPEG IMAGE")
    p.terminate()
    keys = r.zrangebyscore("thumb/channel", min=str(1 - now), max=str(now + 1), start=0, num=1)
    assert len(keys) == 1
    assert r.get(keys[0]) == "JPEG IMAGE"
dataset/ETHPy150Open jbochi/live_thumb/tests/test_integration.py/test_image_is_posted_to_redis_with_utctimestamp/swapped operands of `-`