예제 #1
0
 def test_bad_proto(self) -> None:
     with pytest.raises(ValueError):
         bcu.server_url_for_websocket_url("junk://foo.com/ws")
예제 #2
0
 def test_bad_ending(self) -> None:
     with pytest.raises(ValueError):
         bcu.server_url_for_websocket_url("ws://foo.com/junk")
     with pytest.raises(ValueError):
         bcu.server_url_for_websocket_url("wss://foo.com/junk")
예제 #3
0
 def test_with_wss(self) -> None:
     assert bcu.server_url_for_websocket_url("wss://foo.com/ws") == "https://foo.com/"
예제 #4
0
파일: test_util.py 프로젝트: alamont/bokeh
 def test_bad_ending(self):
     with pytest.raises(ValueError):
         bcu.server_url_for_websocket_url("ws://foo.com/junk")
     with pytest.raises(ValueError):
         bcu.server_url_for_websocket_url("wss://foo.com/junk")
예제 #5
0
파일: test_util.py 프로젝트: alamont/bokeh
 def test_bad_proto(self):
     with pytest.raises(ValueError):
         bcu.server_url_for_websocket_url("junk://foo.com/ws")
예제 #6
0
파일: test_util.py 프로젝트: alamont/bokeh
 def test_with_wss(self):
     assert bcu.server_url_for_websocket_url("wss://foo.com/ws") == "https://foo.com/"
def test_server_url_for_websocket_url_with_ws():
    assert bcu.server_url_for_websocket_url(
        "ws://foo.com/ws") == "http://foo.com/"