59 lines
1.2 KiB
Plaintext
59 lines
1.2 KiB
Plaintext
|
module Test_pythonpaste =
|
||
|
|
||
|
let conf = "
|
||
|
#blah blah
|
||
|
[main]
|
||
|
pipeline = hello
|
||
|
|
||
|
[composite:main]
|
||
|
use = egg:Paste#urlmap
|
||
|
/v2.0 = public_api
|
||
|
/: public_version_api
|
||
|
"
|
||
|
|
||
|
test PythonPaste.lns get conf =
|
||
|
{ }
|
||
|
{ "#comment" = "blah blah" }
|
||
|
{ "main"
|
||
|
{ "pipeline" = "hello" }
|
||
|
{ }
|
||
|
}
|
||
|
{ "composite:main"
|
||
|
{ "use" = "egg:Paste#urlmap" }
|
||
|
{ "1" = "/v2.0 = public_api" }
|
||
|
{ "2" = "/: public_version_api" }
|
||
|
}
|
||
|
|
||
|
|
||
|
test PythonPaste.lns put conf after
|
||
|
set "main/pipeline" "goodbye";
|
||
|
set "composite:main/3" "/v3: a_new_api_version"
|
||
|
= "
|
||
|
#blah blah
|
||
|
[main]
|
||
|
pipeline = goodbye
|
||
|
|
||
|
[composite:main]
|
||
|
use = egg:Paste#urlmap
|
||
|
/v2.0 = public_api
|
||
|
/: public_version_api
|
||
|
/v3: a_new_api_version
|
||
|
"
|
||
|
|
||
|
(* Paste can define global config in DEFAULT, then override with "set" in sections, RHBZ#1175545 *)
|
||
|
test PythonPaste.lns get "[DEFAULT]
|
||
|
log_name = swift
|
||
|
log_facility = LOG_LOCAL1
|
||
|
|
||
|
[app:proxy-server]
|
||
|
use = egg:swift#proxy
|
||
|
set log_name = proxy-server\n" =
|
||
|
{ "DEFAULT"
|
||
|
{ "log_name" = "swift" }
|
||
|
{ "log_facility" = "LOG_LOCAL1" }
|
||
|
{ } }
|
||
|
{ "app:proxy-server"
|
||
|
{ "use" = "egg:swift#proxy" }
|
||
|
{ "log_name" = "proxy-server"
|
||
|
{ "@set" } } }
|