Skip to content

Commit

Permalink
Fix template test
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Sep 13, 2021
1 parent 360df78 commit 55ce8df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/app/preheat_activation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,23 @@ async def test_request_with_theme_parameter(http_server_client, base_url):
We sent request with theme parameter, preheat kernel should
be used if requested theme is same as theme used for prerendered.
"""
wait = NOTEBOOK_EXECUTION_TIME + 1

url = f'{base_url}?voila-theme=light'
time, _ = await send_request(sc=http_server_client, url=url, wait=wait)
assert time < 0.5
wait = NOTEBOOK_EXECUTION_TIME + 2

url = f'{base_url}?voila-theme=dark'
time, _ = await send_request(sc=http_server_client, url=url, wait=wait)
assert time > 0.5

url = f'{base_url}?voila-theme=light'
time, _ = await send_request(sc=http_server_client, url=url, wait=wait)
assert time < 0.5


async def test_request_with_template_parameter(http_server_client, base_url):
"""
We sent request with theme parameter, preheat kernel should
be used if requested theme is same as theme used for prerendered.
"""
wait = NOTEBOOK_EXECUTION_TIME + 1
wait = NOTEBOOK_EXECUTION_TIME + 2

url = f'{base_url}?voila-template=lab'
time, _ = await send_request(sc=http_server_client, url=url, wait=wait)
Expand Down

0 comments on commit 55ce8df

Please sign in to comment.