mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
tests pass
This commit is contained in:
parent
a45a53fdce
commit
5534c78c17
|
@ -46,7 +46,7 @@ def main():
|
||||||
with open(vidp, "rb") as f:
|
with open(vidp, "rb") as f:
|
||||||
ovid = f.read()
|
ovid = f.read()
|
||||||
|
|
||||||
args = ["-p", "4321", "-e2dsa", "-e2tsr"]
|
args = ["-p", "4321", "-e2dsa", "-e2tsr", "--th-ff-jpg"]
|
||||||
pdirs = []
|
pdirs = []
|
||||||
|
|
||||||
for d1 in ["r", "w", "a"]:
|
for d1 in ["r", "w", "a"]:
|
||||||
|
@ -97,12 +97,7 @@ def main():
|
||||||
for d, p in zip(udirs, perms):
|
for d, p in zip(udirs, perms):
|
||||||
u = "{}{}/a.h264?th=j".format(ub, d)
|
u = "{}{}/a.h264?th=j".format(ub, d)
|
||||||
r = requests.get(u)
|
r = requests.get(u)
|
||||||
ok = False
|
ok = bool(r and r.content[:3] == b"\xff\xd8\xff")
|
||||||
if r:
|
|
||||||
r.raw.decode_content = True
|
|
||||||
buf = r.raw.read(256)
|
|
||||||
if buf[:3] == b"\xff\xd8\xff":
|
|
||||||
ok = True
|
|
||||||
if ok != (p in ["a"]):
|
if ok != (p in ["a"]):
|
||||||
raise Exception("thumb {} with perm {} at {}".format(ok, p, u))
|
raise Exception("thumb {} with perm {} at {}".format(ok, p, u))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue