def test_create_url09(self): self.assertEqual( createWsUrl("localhost", isSecure=True, port=9090, path="ws", params={'foo': 'bar'}), "wss://localhost:9090/ws?foo=bar")
def test_create_url10(self): wsurl = createWsUrl("localhost", isSecure=True, port=9090, path="ws", params={ 'foo': 'bar', 'moo': 23 }) self.assertTrue(wsurl == "wss://localhost:9090/ws?foo=bar&moo=23" or wsurl == "wss://localhost:9090/ws?moo=23&foo=bar")
def main(listen_addr='127.0.0.1', port=8947, gpsdws_www_root=DEFAULT_GPSDWS_ROOT, cert=DEFAULT_CERT): # Load server certificate certData = open(DEFAULT_CERT, 'rb').read() certificate = ssl.PrivateCertificate.loadPEM(certData) # Create server uri = createWsUrl(listen_addr, port) site = GPSdWSSite(uri, gpsdws_www_root) reactor.listenSSL(port, site, certificate.options(), interface=listen_addr)
def test_create_url05(self): self.assertEqual(createWsUrl("localhost", path="/ws/foobar"), "ws://localhost:80/ws/foobar")
def test_create_url02(self): self.assertEqual(createWsUrl("localhost", port=8090), "ws://localhost:8090/")
def test_create_url03(self): self.assertEqual(createWsUrl("localhost", path="ws"), "ws://localhost:80/ws")
def test_create_url15(self): self.assertEqual(createWsUrl("0:0:0:0:0:0:0:1", path="ws"), "ws://0:0:0:0:0:0:0:1:80/ws")
def test_create_url01(self): self.assertEqual(createWsUrl("localhost"), "ws://localhost:80/")
def test_create_url02(self): self.assertEqual(createWsUrl("localhost", port = 8090), "ws://localhost:8090/")
def test_create_url05(self): self.assertEqual(createWsUrl("localhost", path = "/ws/foobar"), "ws://localhost:80/ws/foobar")
def test_create_url12(self): self.assertEqual(createWsUrl("62.146.25.34", path = "ws"), "ws://62.146.25.34:80/ws")
def test_create_url11(self): self.assertEqual(createWsUrl("127.0.0.1", path="ws"), "ws://127.0.0.1:80/ws")
def test_create_url10(self): wsurl = createWsUrl("localhost", isSecure = True, port = 9090, path = "ws", params = {'foo': 'bar', 'moo': 23}) self.assertTrue(wsurl == "wss://localhost:9090/ws?foo=bar&moo=23" or wsurl == "wss://localhost:9090/ws?moo=23&foo=bar")
def test_create_url11(self): self.assertEqual(createWsUrl("127.0.0.1", path = "ws"), "ws://127.0.0.1:80/ws")
def test_create_url09(self): self.assertEqual(createWsUrl("localhost", isSecure = True, port = 9090, path = "ws", params = {'foo': 'bar'}), "wss://localhost:9090/ws?foo=bar")
def test_create_url08(self): self.assertEqual(createWsUrl("localhost", isSecure = True, port = 80), "wss://localhost:80/")
def test_create_url07(self): self.assertEqual(createWsUrl("localhost", isSecure = True, port = 443), "wss://localhost:443/")
def test_create_url07(self): self.assertEqual(createWsUrl("localhost", isSecure=True, port=443), "wss://localhost:443/")
def test_create_url13(self): self.assertEqual(createWsUrl("subsub1.sub1.something.com", path="ws"), "ws://subsub1.sub1.something.com:80/ws")
def test_create_url08(self): self.assertEqual(createWsUrl("localhost", isSecure=True, port=80), "wss://localhost:80/")
def test_create_url13(self): self.assertEqual(createWsUrl("subsub1.sub1.something.com", path = "ws"), "ws://subsub1.sub1.something.com:80/ws")
def test_create_url03(self): self.assertEqual(createWsUrl("localhost", path = "ws"), "ws://localhost:80/ws")
def test_create_url12(self): self.assertEqual(createWsUrl("62.146.25.34", path="ws"), "ws://62.146.25.34:80/ws")
def test_create_url14(self): self.assertEqual(createWsUrl("::1", path = "ws"), "ws://::1:80/ws")
def test_create_url14(self): self.assertEqual(createWsUrl("::1", path="ws"), "ws://::1:80/ws")
def test_create_url15(self): self.assertEqual(createWsUrl("0:0:0:0:0:0:0:1", path = "ws"), "ws://0:0:0:0:0:0:0:1:80/ws")