Package cubicweb :: Package devtools :: Module httptest
[hide private]
[frames] | no frames]

Module httptest

source code

this module contains base classes and utilities for integration with running http server
Classes [hide private]
  CubicWebServerConfig
basic configuration class for configuring test server
  CubicWebServerTC
Class for running test web server.
Functions [hide private]
 
get_available_port(ports_scan)
return the first available port from the given ports range
source code
Function Details [hide private]

get_available_port(ports_scan)

source code 
return the first available port from the given ports range

Try to connect port by looking for refused connection (111) or transport
endpoint already connected (106) errors

Raise a RuntimeError if no port can be found

:type ports_range: list
:param ports_range: range of ports to test
:rtype: int

.. see:: :func:`test.test_support.bind_port`