summaryrefslogtreecommitdiffhomepage
path: root/test/test_node_application.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2020-10-19 22:25:29 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2020-10-19 22:25:29 +0100
commit54837759f36eddb80af22c8d73e103a948221dc7 (patch)
tree420c6ce21ad3868db4037d160406f7754bb392e5 /test/test_node_application.py
parentd8628a43d0705deeb3473faf0252288038defc2b (diff)
downloadunit-54837759f36eddb80af22c8d73e103a948221dc7.tar.gz
unit-54837759f36eddb80af22c8d73e103a948221dc7.tar.bz2
Tests: fixed unit.log print.
Diffstat (limited to 'test/test_node_application.py')
-rw-r--r--test/test_node_application.py18
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')