test_python_application.py (1848:4bd548074e2c) test_python_application.py (1850:839024ce4a6a)
1import grp
2import os
3import pwd
4import re
5import time
6
7import pytest
8
9from unit.applications.lang.python import TestApplicationPython
1import grp
2import os
3import pwd
4import re
5import time
6
7import pytest
8
9from unit.applications.lang.python import TestApplicationPython
10from unit.option import option
11
12
13class TestPythonApplication(TestApplicationPython):
14 prerequisites = {'modules': {'python': 'all'}}
15
10
11
12class TestPythonApplication(TestApplicationPython):
13 prerequisites = {'modules': {'python': 'all'}}
14
16 def findall(self, pattern):
17 with open(option.temp_dir + '/unit.log', 'r', errors='ignore') as f:
18 return re.findall(pattern, f.read())
19
20 def test_python_application_variables(self):
21 self.load('variables')
22
23 body = 'Test body string.'
24
25 resp = self.http(
26 b"""POST / HTTP/1.1
27Host: localhost

--- 844 unchanged lines hidden ---
15 def test_python_application_variables(self):
16 self.load('variables')
17
18 body = 'Test body string.'
19
20 resp = self.http(
21 b"""POST / HTTP/1.1
22Host: localhost

--- 844 unchanged lines hidden ---