gufo.http.httpd¶
Httpd context manager for tests.
Httpd
¶
Bases: object
Httpd test context manager.
Attributes:
Name | Type | Description |
---|---|---|
prefix |
URL prefix. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
nginx binary path. |
'/usr/sbin/nginx'
|
address |
str
|
Listen address. |
'127.0.0.1'
|
port |
int
|
Listen port. |
10080
|
host |
str
|
Server hostname. |
'local.gufolabs.com'
|
start_timeout |
float
|
Maximum time to wait for nginx to start. |
5.0
|
check_config |
bool
|
Check nginx config on startup. |
True
|
mode |
HttpdMode
|
HTTP or HTTPS |
HTTP
|
HttpdMode
¶
Bases: Enum
Httpd mode.
Attributes:
Name | Type | Description |
---|---|---|
HTTP |
HTTP Mode. |
|
HTTPS |
HTTPS Mode. |