diff options
author | Andrei Belov <defan@nginx.com> | 2020-08-13 19:28:27 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2020-08-13 19:28:27 +0300 |
commit | aff76e4f90b4e948c327ce2b021dc3203c33cbcd (patch) | |
tree | 5bd6ac3aa92683777548472984c209bf26d8a971 /test/test_python_application.py | |
parent | 04ce9f997e0e49e57ce4b5fc4aa98134232a1974 (diff) | |
parent | 6473d4b65a99aa10d509220fb99d8c4f65631ed0 (diff) | |
download | unit-aff76e4f90b4e948c327ce2b021dc3203c33cbcd.tar.gz unit-aff76e4f90b4e948c327ce2b021dc3203c33cbcd.tar.bz2 |
Merged with the default branch.1.19.0-1
Diffstat (limited to 'test/test_python_application.py')
-rw-r--r-- | test/test_python_application.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_python_application.py b/test/test_python_application.py index 8bd3f750..4b8983ff 100644 --- a/test/test_python_application.py +++ b/test/test_python_application.py @@ -579,6 +579,17 @@ last line: 987654321 self.assertEqual(self.get()['status'], 500, 'syntax error') + def test_python_application_loading_error(self): + self.skip_alerts.append(r'Python failed to import module "blah"') + + self.load('empty') + + self.assertIn( + 'success', self.conf('"blah"', 'applications/empty/module'), + ) + + self.assertEqual(self.get()['status'], 503, 'loading error') + def test_python_application_close(self): self.load('close') |