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