blob: d4d3389b472f47687a8607b242c1f29fbf79950a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import time
from playwright.sync_api import Page
def test_tileproxy(page: Page, playwright_helper, caplog):
playwright_helper.login()
track_id = playwright_helper.add_track().id
page.goto(f"/track/{track_id}")
with page.expect_request("/tile/test/**"):
pass
# If we're too fast, the log entry might not be there yet, wait 2 more
# seconds
if "Skipping tile proxy request for testing URL" not in caplog.messages:
time.sleep(2)
assert "Skipping tile proxy request for testing URL" in caplog.messages
|