示例#1
0
 def test_all_fields(self):
     self.assertEqual(
         binding._authority(
             scheme="http", 
             host="splunk.utopia.net",
             port="471"),
         "http://splunk.utopia.net:471")
示例#2
0
 def test_ipv4_host(self):
     self.assertEqual(
         binding._authority(
             host="splunk.utopia.net"),
         "https://splunk.utopia.net:8089")
示例#3
0
 def test_ipv6_host(self):
     self.assertEqual(
         binding._authority(
             host="2001:0db8:85a3:0000:0000:8a2e:0370:7334"),
         "https://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:8089")
示例#4
0
 def test_authority_default(self):
     self.assertEqual(binding._authority(), 
                      "https://localhost:8089")
示例#5
0
 def test_all_fields(self):
     self.assertEqual(
         binding._authority(scheme="http",
                            host="splunk.utopia.net",
                            port="471"), "http://splunk.utopia.net:471")
示例#6
0
 def test_ipv6_host(self):
     self.assertEqual(
         binding._authority(host="2001:0db8:85a3:0000:0000:8a2e:0370:7334"),
         "https://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:8089")
示例#7
0
 def test_ipv4_host(self):
     self.assertEqual(binding._authority(host="splunk.utopia.net"),
                      "https://splunk.utopia.net:8089")
示例#8
0
 def test_authority_default(self):
     self.assertEqual(binding._authority(), "https://localhost:8089")