Fix Youtube test
All checks were successful
Deploy to Server / deploy (push) Successful in 11s

This commit is contained in:
Joakim Hellsén 2026-03-16 23:31:12 +01:00
commit e044506e4c
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk

View file

@ -20,7 +20,7 @@ class YouTubeIndexViewTest(TestCase):
response: _MonkeyPatchedWSGIResponse = self.client.get(reverse("youtube:index"))
content: str = response.content.decode()
assert "YouTube Drops Channels" in content
assert "YouTube channels with rewards." in content
assert "Call of Duty" in content
assert "PlayOverwatch" in content
assert "Hearthstone" in content
@ -42,8 +42,11 @@ class YouTubeIndexViewTest(TestCase):
response: _MonkeyPatchedWSGIResponse = self.client.get(reverse("youtube:index"))
content: str = response.content.decode()
assert "<h2>Activision (Call of Duty)</h2>" in content
assert "<h2>Battle.net / Blizzard</h2>" in content
assert content.index("<h2>Activision (Call of Duty)</h2>") < content.index(
"<h2>Battle.net / Blizzard</h2>",
activision_cell: str = "<td>Activision (Call of Duty)</td>"
blizzard_cell: str = "<td>Battle.net / Blizzard</td>"
assert activision_cell in content
assert blizzard_cell in content
assert content.index(activision_cell) < content.index(
blizzard_cell,
)