diff options
| author | Tim Burke <tim.burke@gmail.com> | 2016-07-20 14:13:16 -0700 |
|---|---|---|
| committer | Tim Burke <tim.burke@gmail.com> | 2016-07-20 14:13:16 -0700 |
| commit | a2a041b7da2850c82df195ab36450a8aee8129b5 (patch) | |
| tree | 41b854b02229a9cc3d6830a6221f778bc16d0a53 /tests/sample_configs | |
| download | pastedeploy-git-a2a041b7da2850c82df195ab36450a8aee8129b5.tar.gz | |
Fix string-formatting args when raising LookupError
Previously, this would trigger
TypeError: not enough arguments for format string
Diffstat (limited to 'tests/sample_configs')
| -rw-r--r-- | tests/sample_configs/basic_app.ini | 14 | ||||
| -rwxr-xr-x | tests/sample_configs/executable.ini | 10 | ||||
| -rw-r--r-- | tests/sample_configs/test_config.ini | 38 | ||||
| -rw-r--r-- | tests/sample_configs/test_config_included.ini | 10 | ||||
| -rw-r--r-- | tests/sample_configs/test_error.ini | 8 | ||||
| -rw-r--r-- | tests/sample_configs/test_filter.ini | 26 | ||||
| -rw-r--r-- | tests/sample_configs/test_filter_with.ini | 12 | ||||
| -rw-r--r-- | tests/sample_configs/test_func.ini | 13 |
8 files changed, 131 insertions, 0 deletions
diff --git a/tests/sample_configs/basic_app.ini b/tests/sample_configs/basic_app.ini new file mode 100644 index 0000000..f1d931c --- /dev/null +++ b/tests/sample_configs/basic_app.ini @@ -0,0 +1,14 @@ +[application:main] +use = egg:FakeApp#basic_app + +[application:other] +use = egg:FakeApp#other + +[composit:remote_addr] +use = egg:FakeApp#remote_addr +app.1 = main +addr.1 = 127.0.0.1 + +app.2 = other +addr.2 = 0.0.0.0 + diff --git a/tests/sample_configs/executable.ini b/tests/sample_configs/executable.ini new file mode 100755 index 0000000..3b75fe9 --- /dev/null +++ b/tests/sample_configs/executable.ini @@ -0,0 +1,10 @@ +#!/usr/bin/env paster +[exe] +sys.path = /fake/path/ + /another/fake/path ../fake_packages/ + +[server] +use = egg:PasteScript#cgi + +[app] +use = egg:FakeApp#basic_app diff --git a/tests/sample_configs/test_config.ini b/tests/sample_configs/test_config.ini new file mode 100644 index 0000000..d614829 --- /dev/null +++ b/tests/sample_configs/test_config.ini @@ -0,0 +1,38 @@ +[DEFAULT] +def1 = a +def2 = b +basepath = %(here)s + +[app:test1] +use = egg:FakeApp#configed +setting1 = foo +setting2 = bar +apppath = %(basepath)s/app + +[app:test2] +use = egg:FakeApp#configed +set def1 = test2 +set another = TEST +local conf = something + +[app:test3] +use = test2 +set def1 = test3 +another = something more + across several + lines + +[app:test_foreign_config] +use = config:test_config_included.ini +set glob = override +another = FOO + +[app:test_get] +use = egg:FakeApp#configed +set def2 = TEST +get def1 = def1 +get foo = def2 + +[app:test_global_conf] +use = egg:FakeApp#configed +test_interp = this:%(inherit)s diff --git a/tests/sample_configs/test_config_included.ini b/tests/sample_configs/test_config_included.ini new file mode 100644 index 0000000..cc0da7a --- /dev/null +++ b/tests/sample_configs/test_config_included.ini @@ -0,0 +1,10 @@ +[DEFAULT] +def2 = from include +def3 = c + +[app:main] +# Equivalent to the egg reference, but just for kicks... +paste.app_factory = fakeapp.configapps:SimpleApp.make_app +set glob = orig +bob = your uncle +another = BAR diff --git a/tests/sample_configs/test_error.ini b/tests/sample_configs/test_error.ini new file mode 100644 index 0000000..b6ad5b2 --- /dev/null +++ b/tests/sample_configs/test_error.ini @@ -0,0 +1,8 @@ +[DEFAULT] +def1 = a +def2 = b + +[app:main] +use = egg:FakeApp#configed +setting1 = foo +setting2 = %(does_not_exist)s/bar diff --git a/tests/sample_configs/test_filter.ini b/tests/sample_configs/test_filter.ini new file mode 100644 index 0000000..733c0aa --- /dev/null +++ b/tests/sample_configs/test_filter.ini @@ -0,0 +1,26 @@ +[app:normal] +use = egg:FakeApp#basic_app + +[pipeline:piped] +pipeline = egg:FakeApp#caps normal + +[filter-app:filt] +use = egg:FakeApp#caps +method_to_call = lower +next = normal + +[pipeline:piped2] +pipeline = egg:FakeApp#caps2 normal + +[filter-app:filt2] +use = egg:FakeApp#caps2 +method_to_call = lower +next = normal + +[app:inv] +use = egg:FakeApp#basic_app +filter-with = egg:FakeApp#caps + +[pipeline:piped3] +pipeline = egg:FakeApp#caps normal +extra_config_option = bad diff --git a/tests/sample_configs/test_filter_with.ini b/tests/sample_configs/test_filter_with.ini new file mode 100644 index 0000000..118804f --- /dev/null +++ b/tests/sample_configs/test_filter_with.ini @@ -0,0 +1,12 @@ +[app:main] +use = egg:FakeApp#basic_app +example = test +filter-with = filter1 + +[filter:filter1] +use = egg:FakeApp#caps +filter-with = filter2 + +[filter:filter2] +use = egg:FakeApp#caps + diff --git a/tests/sample_configs/test_func.ini b/tests/sample_configs/test_func.ini new file mode 100644 index 0000000..a0d28c4 --- /dev/null +++ b/tests/sample_configs/test_func.ini @@ -0,0 +1,13 @@ +[application:main] +use = call:fakeapp.apps:make_basic_app + +[application:other] +use = call:fakeapp.apps:make_basic_app2 + +[composit:remote_addr] +use = call:fakeapp.apps:make_remote_addr +app.1 = main +addr.1 = 127.0.0.1 + +app.2 = other +addr.2 = 0.0.0.0
\ No newline at end of file |
