summaryrefslogtreecommitdiffhomepage
path: root/test/test_php_targets.py
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-01-26 12:11:49 +0000
committerAndrew Clayton <a.clayton@nginx.com>2023-01-30 17:00:13 +0000
commit0be289b7fcd6c837710fb3868b3b3fbdc0395b64 (patch)
treecadaaadaf4c006e89c08fb02679c3c04854ea852 /test/test_php_targets.py
parentbebc03c729df1d7efc81a5af8b8dac40b333d408 (diff)
downloadunit-0be289b7fcd6c837710fb3868b3b3fbdc0395b64.tar.gz
unit-0be289b7fcd6c837710fb3868b3b3fbdc0395b64.tar.bz2
Tests: Add some PHP tests for 403 and 404 error handling.
Since the previous commit, we now properly handle 403 Forbidden & 404 Not Found errors in the PHP language module. This adds a test for 403 Forbidden to test/test_php_application.py, but also fixes a test in test/test_php_targets.py where we were checking for 503 but should have been a 404, which we now do. Acked-by: Alejandro Colomar <alx@nginx.com> Cc: Andrei Zeliankou <zelenkov@nginx.com> [ Incorporates a couple of small test cleanups from Andrei ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
-rw-r--r--test/test_php_targets.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_php_targets.py b/test/test_php_targets.py
index eec1846f..2cf39c1c 100644
--- a/test/test_php_targets.py
+++ b/test/test_php_targets.py
@@ -45,7 +45,7 @@ class TestPHPTargets(TestApplicationPHP):
assert self.get(url='/1')['body'] == '1'
assert self.get(url='/2')['body'] == '2'
- assert self.get(url='/blah')['status'] == 503 # TODO 404
+ assert self.get(url='/blah')['status'] == 404
assert self.get(url='/')['body'] == 'index'
assert self.get(url='/1.php?test=test.php/')['body'] == '1'