Ejemplo n.º 1
0
 def test_get_instance_port_not_found(self):
     zconf = ZopeConfPathStub('<http-server>',
                              '</http-server>')
     self.assertEquals(None, get_instance_port(zconf))
Ejemplo n.º 2
0
 def test_get_instance_port_public_ip(self):
     zconf = ZopeConfPathStub('ip-address 0.0.0.0',
                              '<http-server>',
                              '  address 127.0.0.1:8080',
                              '</http-server>')
     self.assertEquals(8080, get_instance_port(zconf))
Ejemplo n.º 3
0
 def test_get_instance_port_no_indent(self):
     zconf = ZopeConfPathStub('<http-server>',
                              'address 8080',
                              '</http-server>')
     self.assertEquals(8080, get_instance_port(zconf))
Ejemplo n.º 4
0
 def test_get_instance_port_localhost_interface_prefix(self):
     zconf = ZopeConfPathStub('<http-server>',
                              '  address 127.0.0.1:8080',
                              '</http-server>')
     self.assertEquals(8080, get_instance_port(zconf))