UI - Live preview - misc improvements (Adding test, fixes to filters) (#2663)

This commit is contained in:
dgtlmoon
2024-09-30 13:54:35 +02:00
committed by GitHub
parent 1b625dc18a
commit 5b34aece96
6 changed files with 19 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks
from .util import live_server_setup, wait_for_all_checks, extract_UUID_from_client
import pytest
@@ -38,6 +38,11 @@ def test_check_encoding_detection(client, live_server, measure_memory_usage):
# Give the thread time to pick it up
wait_for_all_checks(client)
# Content type recording worked
uuid = extract_UUID_from_client(client)
assert live_server.app.config['DATASTORE'].data['watching'][uuid]['content-type'] == "text/html"
res = client.get(
url_for("preview_page", uuid="first"),
follow_redirects=True