Example #1
0
 def test_get_canonical_host_with_non_default_port(self):
     """
     If the port is not the default, the canonical host includes it.
     """
     uri = "http://my.service:99/endpoint"
     endpoint = AWSServiceEndpoint(uri=uri)
     self.assertEquals("my.service:99", endpoint.get_canonical_host())
Example #2
0
 def test_get_canonical_host_is_lower_case(self):
     """
     The canonical host is guaranteed to be lower case.
     """
     uri = "http://MY.SerVice:99/endpoint"
     endpoint = AWSServiceEndpoint(uri=uri)
     self.assertEquals("my.service:99", endpoint.get_canonical_host())
Example #3
0
 def test_get_canonical_host(self):
     """
     If the port is not specified the canonical host is the same as
     the host.
     """
     uri = "http://my.service/endpoint"
     endpoint = AWSServiceEndpoint(uri=uri)
     self.assertEquals("my.service", endpoint.get_canonical_host())