diff options
author | Andrei Belov <defan@nginx.com> | 2021-05-27 17:03:24 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2021-05-27 17:03:24 +0300 |
commit | 0afb4b5790c5a37ba6b880eb351a65fe00521fbe (patch) | |
tree | c7e0b6bed92ee62a5e8b13c945c4134e68554cec /test/test_node_application.py | |
parent | 21ff5e086ece7188df3b7338d228fa4fb7f886af (diff) | |
parent | d06e55dfa3692e27a92ff6c2534bb083416bc0c8 (diff) | |
download | unit-0afb4b5790c5a37ba6b880eb351a65fe00521fbe.tar.gz unit-0afb4b5790c5a37ba6b880eb351a65fe00521fbe.tar.bz2 |
Merged with the default branch.1.24.0-1
Diffstat (limited to 'test/test_node_application.py')
-rw-r--r-- | test/test_node_application.py | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/test/test_node_application.py b/test/test_node_application.py index b277dc3a..48ed8d3d 100644 --- a/test/test_node_application.py +++ b/test/test_node_application.py @@ -1,6 +1,7 @@ import re import pytest + from unit.applications.lang.node import TestApplicationNode from unit.utils import waitforfiles @@ -8,13 +9,26 @@ from unit.utils import waitforfiles class TestNodeApplication(TestApplicationNode): prerequisites = {'modules': {'node': 'all'}} - def test_node_application_basic(self): - self.load('basic') - + def assert_basic_application(self): resp = self.get() assert resp['headers']['Content-Type'] == 'text/plain', 'basic header' assert resp['body'] == 'Hello World\n', 'basic body' + def test_node_application_basic(self): + self.load('basic') + + self.assert_basic_application() + + def test_node_application_loader_unit_http(self): + self.load('loader/unit_http') + + self.assert_basic_application() + + def test_node_application_loader_transitive_dependency(self): + self.load('loader/transitive_dependency') + + self.assert_basic_application() + def test_node_application_seq(self): self.load('basic') @@ -205,7 +219,9 @@ class TestNodeApplication(TestApplicationNode): def test_node_application_status_message(self): self.load('status_message') - assert re.search(r'200 blah', self.get(raw_resp=True)), 'status message' + assert re.search( + r'200 blah', self.get(raw_resp=True) + ), 'status message' def test_node_application_get_header_type(self): self.load('get_header_type') |