Skip to content

Commit 49261b6

Browse files
committed
update test
1 parent 1ddbb84 commit 49261b6

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

tests/app/preheat_activation_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ async def test_render_time_with_multiple_requests(http_server_client,
7171
async def test_request_with_query(http_server_client, base_url):
7272
"""
7373
We sent request with query parameter, preheat kernel should
74-
be disable is this case.
74+
be activated.
7575
"""
7676
url = f'{base_url}?foo=bar'
7777
time, _ = await send_request(sc=http_server_client,
7878
url=url,
7979
wait=NOTEBOOK_EXECUTION_TIME + 1)
80-
assert time > TIME_THRESHOLD
80+
assert time < TIME_THRESHOLD
8181

8282

8383
async def test_request_with_theme_parameter(http_server_client, base_url):

tests/notebooks/preheat/pre_heat.ipynb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@
2222
"import os\n",
2323
"os.getenv('foo')"
2424
]
25-
},
26-
{
27-
"cell_type": "code",
28-
"execution_count": null,
29-
"id": "0e689ec5-708c-4cac-98ba-02b00411e41d",
30-
"metadata": {},
31-
"outputs": [],
32-
"source": []
3325
}
3426
],
3527
"metadata": {
@@ -48,7 +40,7 @@
4840
"name": "python",
4941
"nbconvert_exporter": "python",
5042
"pygments_lexer": "ipython3",
51-
"version": "3.9.6"
43+
"version": "3.9.7"
5244
}
5345
},
5446
"nbformat": 4,

voila/query_parameters_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ def on_close(self) -> None:
4040
def send_updates(cls: 'QueryStringSocketHandler', msg: Dict) -> None:
4141
"""Class method used to dispath the query string to the waiting
4242
notebook. This method is called in `VoilaHandler` when the query
43-
string becomes available.
43+
string becomes available.
4444
If this method is called before the opening of websocket connection,
4545
`msg` is stored in `_cache0` and the message will be dispatched when
4646
a notebook with coresponding kernel id is connected.
4747
4848
Args:
4949
- msg (Dict): this dictionary contains the `kernel_id` to identify
5050
the waiting notebook and `payload` is the query string.
51-
"""
51+
"""
5252
kernel_id = msg['kernel_id']
5353
payload = msg['payload']
5454
waiter = cls._waiters.get(kernel_id, None)

0 commit comments

Comments
 (0)