示例#1
0
 def test_arg(self):
     assert bes._clean_url("http://foo/bar") == "http://foo/bar"
     assert bes._clean_url("http://foo/bar/") == "http://foo/bar"
示例#2
0
 def test_bad_ws(self):
     with pytest.raises(ValueError):
         bes._clean_url("ws://foo")
示例#3
0
 def test_default(self):
     assert bes._clean_url("default") == bes.DEFAULT_SERVER_HTTP_URL.rstrip("/")
示例#4
0
 def test_arg(self) -> None:
     assert bes._clean_url("http://foo/bar") == "http://foo/bar"
     assert bes._clean_url("http://foo/bar/") == "http://foo/bar"
示例#5
0
 def test_bad_ws(self) -> None:
     with pytest.raises(ValueError):
         bes._clean_url("ws://foo")
示例#6
0
 def test_default(self) -> None:
     assert bes._clean_url("default") == bes.DEFAULT_SERVER_HTTP_URL.rstrip("/")