diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2020-08-13 13:17:27 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2020-08-13 13:17:27 +0100 |
commit | 8032686a57c739d673e5554ba8517a4076f9e742 (patch) | |
tree | b484f8c3eeecee2342d31d40a7da37148546c4fc /test/test_python_application.py | |
parent | c40e45344fa606984910a7e47db2b2f881cb963c (diff) | |
download | unit-8032686a57c739d673e5554ba8517a4076f9e742.tar.gz unit-8032686a57c739d673e5554ba8517a4076f9e742.tar.bz2 |
Tests: added test with error on loading application.
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') |