From 5534c78c174bdf7aaca647723222d6fc621f8211 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 11 Jun 2021 03:10:33 +0200 Subject: [PATCH] tests pass --- scripts/test/smoketest.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/test/smoketest.py b/scripts/test/smoketest.py index 8bcb6bc0..648de30d 100644 --- a/scripts/test/smoketest.py +++ b/scripts/test/smoketest.py @@ -46,7 +46,7 @@ def main(): with open(vidp, "rb") as f: ovid = f.read() - args = ["-p", "4321", "-e2dsa", "-e2tsr"] + args = ["-p", "4321", "-e2dsa", "-e2tsr", "--th-ff-jpg"] pdirs = [] for d1 in ["r", "w", "a"]: @@ -97,12 +97,7 @@ def main(): for d, p in zip(udirs, perms): u = "{}{}/a.h264?th=j".format(ub, d) r = requests.get(u) - ok = False - if r: - r.raw.decode_content = True - buf = r.raw.read(256) - if buf[:3] == b"\xff\xd8\xff": - ok = True + ok = bool(r and r.content[:3] == b"\xff\xd8\xff") if ok != (p in ["a"]): raise Exception("thumb {} with perm {} at {}".format(ok, p, u))