File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 1- import os
21import warnings
32from typing import Any , Dict
43
76from shiny ._main import _set_workbench_kwargs
87
98
10- def test_workbench_kwargs_if_url_set ():
9+ def test_workbench_kwargs_if_url_set (monkeypatch : pytest . MonkeyPatch ):
1110 """
1211 Test that the `ws_per_message_deflate` kwarg is set to False when
1312 RS_SERVER_URL and RS_SESSION_URL are set in the environment.
1413 This is to avoid breaking issues in Workbench.
1514 If the kwargs are set to True, a warning is raised and the value is set to False.
1615 """
1716 # Workbench URL is set, kwargs are not
18- os . environ [ "RS_SERVER_URL" ] = "any_string"
19- os . environ [ "RS_SESSION_URL" ] = "any_string"
17+ monkeypatch . setenv ( "RS_SERVER_URL" , "any_string" )
18+ monkeypatch . setenv ( "RS_SESSION_URL" , "any_string" )
2019
2120 kwargs : Dict [str , Any ] = {}
2221 _set_workbench_kwargs (kwargs )
@@ -35,10 +34,6 @@ def test_workbench_kwargs_if_url_set():
3534 _set_workbench_kwargs (kwargs )
3635 assert kwargs .get ("ws_per_message_deflate" ) is False
3736
38- # Teardown
39- del os .environ ["RS_SERVER_URL" ]
40- del os .environ ["RS_SESSION_URL" ]
41-
4237
4338def test_workbench_kwargs_if_url_not_set ():
4439 """
You can’t perform that action at this time.
0 commit comments