def test_contents_are_encoded():
    tempdir = tempfile.mkdtemp()
    p = run_broadcaster(tempdir, envs={"BASE64_ENCODE": "1"})
    r = get_async()
    create_image(tempdir, "channel", "JPEG IMAGE")
    p.terminate()
    buffer_size = 45
    data = r.get(timeout=2).read(buffer_size)
    assert "JPEG IMAGE" not in data
    assert b64encode("JPEG IMAGE") in data
dataset/ETHPy150Open jbochi/live_thumb/tests/test_integration.py/test_contents_are_encoded/original