diff options
author | Andrei Belov <defan@nginx.com> | 2020-11-19 21:19:57 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2020-11-19 21:19:57 +0300 |
commit | 7f9079a3cd4cdb6ac3fea53f10bd34fe8b82fe9c (patch) | |
tree | c79dc48a3260156f3f824ecd299e5a4934d749c5 /test/test_node_application.py | |
parent | 646d047e5d12515ceac02279b373601ce0752982 (diff) | |
parent | 806a9b2515c60b12a68cd97af04f7fa5cb4dffed (diff) | |
download | unit-7f9079a3cd4cdb6ac3fea53f10bd34fe8b82fe9c.tar.gz unit-7f9079a3cd4cdb6ac3fea53f10bd34fe8b82fe9c.tar.bz2 |
Merged with the default branch.1.21.0-1
Diffstat (limited to 'test/test_node_application.py')
-rw-r--r-- | test/test_node_application.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/test_node_application.py b/test/test_node_application.py index a0b882f3..c8c3a444 100644 --- a/test/test_node_application.py +++ b/test/test_node_application.py @@ -139,11 +139,11 @@ class TestNodeApplication(TestApplicationNode): assert self.get()['body'] == 'buffer', 'write buffer' - def test_node_application_write_callback(self): + def test_node_application_write_callback(self, temp_dir): self.load('write_callback') assert self.get()['body'] == 'helloworld', 'write callback order' - assert waitforfiles(self.temp_dir + '/node/callback'), 'write callback' + assert waitforfiles(temp_dir + '/node/callback'), 'write callback' def test_node_application_write_before_write_head(self): self.load('write_before_write_head') @@ -222,7 +222,7 @@ class TestNodeApplication(TestApplicationNode): assert 'X-Header' not in headers, 'insensitive' assert 'X-header' not in headers, 'insensitive 2' - def test_node_application_promise_handler(self): + def test_node_application_promise_handler(self, temp_dir): self.load('promise_handler') assert ( @@ -236,7 +236,7 @@ class TestNodeApplication(TestApplicationNode): )['status'] == 200 ), 'promise handler request' - assert waitforfiles(self.temp_dir + '/node/callback'), 'promise handler' + assert waitforfiles(temp_dir + '/node/callback'), 'promise handler' def test_node_application_promise_handler_write_after_end(self): self.load('promise_handler') @@ -254,7 +254,7 @@ class TestNodeApplication(TestApplicationNode): == 200 ), 'promise handler request write after end' - def test_node_application_promise_end(self): + def test_node_application_promise_end(self, temp_dir): self.load('promise_end') assert ( @@ -268,9 +268,9 @@ class TestNodeApplication(TestApplicationNode): )['status'] == 200 ), 'promise end request' - assert waitforfiles(self.temp_dir + '/node/callback'), 'promise end' + assert waitforfiles(temp_dir + '/node/callback'), 'promise end' - def test_node_application_promise_multiple_calls(self): + def test_node_application_promise_multiple_calls(self, temp_dir): self.load('promise_handler') self.post( @@ -283,7 +283,7 @@ class TestNodeApplication(TestApplicationNode): ) assert waitforfiles( - self.temp_dir + '/node/callback1' + temp_dir + '/node/callback1' ), 'promise first call' self.post( @@ -296,7 +296,7 @@ class TestNodeApplication(TestApplicationNode): ) assert waitforfiles( - self.temp_dir + '/node/callback2' + temp_dir + '/node/callback2' ), 'promise second call' @pytest.mark.skip('not yet') |