This commit is contained in:
team3
2026-10-01 00:09:16 +02:00
parent 8ddd8208f5
commit bd1694528a
3 changed files with 52 additions and 17 deletions

View File

@@ -128,8 +128,12 @@ def test_fremde_sehen_nichts_der_host_alles(client, client2, zuschauer, hostmodu
def test_fenster_wird_begrenzt_und_macht_schnitt_ungueltig(client, monkeypatch):
m = marke(client)
geaendert = client.patch(f"/api/clips/{m['id']}", json={"vorher": 5000, "dauer": 1, "titel": " Hallo "}).json()
geaendert = client.patch(f"/api/clips/{m['id']}", json={"vorher": 99999, "dauer": 1, "titel": " Hallo "}).json()
assert (geaendert["vorher"], geaendert["dauer"], geaendert["titel"]) == (clips.MAX_VORHER, clips.MIN_DAUER, "Hallo")
# Das Fenster darf auch nach der Marke liegen — bis vier Stunden weit
assert client.patch(f"/api/clips/{m['id']}", json={"vorher": -60}).json()["vorher"] == -60
assert client.patch(f"/api/clips/{m['id']}", json={"vorher": -99999}).json()["vorher"] == -clips.MAX_VORHER
client.patch(f"/api/clips/{m['id']}", json={"vorher": clips.MAX_VORHER, "dauer": 1})
# Schneiden: der Playback-Server wird nachgestellt
class Antwort: