Ejemplo n.º 1
0
 def test_configure_error_invalid_protocol(self):
     """
 Attempting to configure HttpAdapter with unsupported protocol.
 """
     with self.assertRaises(InvalidUri):
         HttpAdapter.configure('ftp://localhost:14265/')
Ejemplo n.º 2
0
 def test_configure_error_udp(self):
     """
 UDP is not a valid protocol for ``HttpAdapter``.
 """
     with self.assertRaises(InvalidUri):
         HttpAdapter.configure('udp://localhost:14265')
Ejemplo n.º 3
0
 def test_configure_error_missing_protocol(self):
     """
 Forgetting to add the protocol to the URI.
 """
     with self.assertRaises(InvalidUri):
         HttpAdapter.configure('localhost:14265')
Ejemplo n.º 4
0
 def test_configure_error_empty_host(self):
     """
 Attempting to configure HttpAdapter with empty host.
 """
     with self.assertRaises(InvalidUri):
         HttpAdapter.configure('http://:14265')
Ejemplo n.º 5
0
 def test_configure_error_non_numeric_port(self):
     """
 Attempting to configure HttpAdapter with non-numeric port.
 """
     with self.assertRaises(InvalidUri):
         HttpAdapter.configure('http://localhost:iota/')
Ejemplo n.º 6
0
 def test_configure_error_udp(self):
   """
   UDP is not a valid protocol for ``HttpAdapter``.
   """
   with self.assertRaises(InvalidUri):
     HttpAdapter.configure('udp://localhost:14265')
Ejemplo n.º 7
0
 def test_configure_error_non_numeric_port(self):
   """
   Attempting to configure HttpAdapter with non-numeric port.
   """
   with self.assertRaises(InvalidUri):
     HttpAdapter.configure('http://localhost:iota/')
Ejemplo n.º 8
0
 def test_configure_error_empty_host(self):
   """
   Attempting to configure HttpAdapter with empty host.
   """
   with self.assertRaises(InvalidUri):
     HttpAdapter.configure('http://:14265')
Ejemplo n.º 9
0
 def test_configure_error_invalid_protocol(self):
   """
   Attempting to configure HttpAdapter with unsupported protocol.
   """
   with self.assertRaises(InvalidUri):
     HttpAdapter.configure('ftp://localhost:14265/')
Ejemplo n.º 10
0
 def test_configure_error_missing_protocol(self):
   """
   Forgetting to add the protocol to the URI.
   """
   with self.assertRaises(InvalidUri):
     HttpAdapter.configure('localhost:14265')