diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-30 17:53:12 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-31 12:41:11 +0200 |
commit | aee8b9bfb25df4490d137655d0ce097a6b9706fc (patch) | |
tree | a8c01ea8997065d22c889a80c34fd9cf72b2c8ee /test/test_variables.py | |
parent | 9bf614cd0874e0ef9fda3145faacd3ef3a5fb0ed (diff) | |
download | unit-aee8b9bfb25df4490d137655d0ce097a6b9706fc.tar.gz unit-aee8b9bfb25df4490d137655d0ce097a6b9706fc.tar.bz2 |
Tests: Added tests for $request_uri.
Diffstat (limited to 'test/test_variables.py')
-rw-r--r-- | test/test_variables.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_variables.py b/test/test_variables.py index f110fb74..728e86b0 100644 --- a/test/test_variables.py +++ b/test/test_variables.py @@ -17,6 +17,7 @@ class TestVariables(TestApplicationProto): "5GET": [{"action": {"return": 206}}], "GETGET": [{"action": {"return": 207}}], "localhost": [{"action": {"return": 208}}], + "9*?q": [{"action": {"return": 209}}], }, }, ), 'configure routes' @@ -28,6 +29,14 @@ class TestVariables(TestApplicationProto): assert self.get()['status'] == 201, 'method GET' assert self.post()['status'] == 202, 'method POST' + def test_variables_request_uri(self): + self.conf_routes("\"routes$request_uri\"") + + assert self.get(url='/3')['status'] == 203, 'request_uri' + assert self.get(url='/4*')['status'] == 204, 'request_uri 2' + assert self.get(url='/4%2A')['status'] == 204, 'request_uri 3' + assert self.get(url='/9%2A?q')['status'] == 209, 'request_uri & query' + def test_variables_uri(self): self.conf_routes("\"routes$uri\"") |