test_node_application.py (1596:b7e2d4d92624) test_node_application.py (1635:97afbb6c5a15)
1import pytest
2import re
3
1import re
2
4from unit.applications.lang.node import TestApplicationNode
3import pytest
4
5from conftest import waitforfiles
5from conftest import waitforfiles
6from unit.applications.lang.node import TestApplicationNode
6
7
8class TestNodeApplication(TestApplicationNode):
9 prerequisites = {'modules': {'node': 'all'}}
10
11 def test_node_application_basic(self):
12 self.load('basic')
13

--- 31 unchanged lines hidden (view full) ---

45 assert date[-4:] == ' GMT', 'date header timezone'
46 assert (
47 abs(self.date_to_sec_epoch(date) - self.sec_epoch()) < 5
48 ), 'date header'
49
50 raw_headers = headers.pop('Request-Raw-Headers')
51 assert re.search(
52 r'^(?:Host|localhost|Content-Type|'
7
8
9class TestNodeApplication(TestApplicationNode):
10 prerequisites = {'modules': {'node': 'all'}}
11
12 def test_node_application_basic(self):
13 self.load('basic')
14

--- 31 unchanged lines hidden (view full) ---

46 assert date[-4:] == ' GMT', 'date header timezone'
47 assert (
48 abs(self.date_to_sec_epoch(date) - self.sec_epoch()) < 5
49 ), 'date header'
50
51 raw_headers = headers.pop('Request-Raw-Headers')
52 assert re.search(
53 r'^(?:Host|localhost|Content-Type|'
53 'text\/html|Custom-Header|blah|Content-Length|17|Connection|'
54 'close|,)+$',
54 r'text\/html|Custom-Header|blah|Content-Length|17|Connection|'
55 r'close|,)+$',
55 raw_headers,
56 ), 'raw headers'
57
58 assert headers == {
59 'Connection': 'close',
60 'Content-Length': str(len(body)),
61 'Content-Type': 'text/html',
62 'Request-Method': 'POST',

--- 286 unchanged lines hidden ---
56 raw_headers,
57 ), 'raw headers'
58
59 assert headers == {
60 'Connection': 'close',
61 'Content-Length': str(len(body)),
62 'Content-Type': 'text/html',
63 'Request-Method': 'POST',

--- 286 unchanged lines hidden ---