示例#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/')
示例#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')
示例#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')
示例#4
0
 def test_configure_error_empty_host(self):
     """
 Attempting to configure HttpAdapter with empty host.
 """
     with self.assertRaises(InvalidUri):
         HttpAdapter.configure('http://:14265')
示例#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/')
示例#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')
示例#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/')
示例#8
0
 def test_configure_error_empty_host(self):
   """
   Attempting to configure HttpAdapter with empty host.
   """
   with self.assertRaises(InvalidUri):
     HttpAdapter.configure('http://:14265')
示例#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/')
示例#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')