3a4 > import signal 5d5 < from subprocess import call 98c98 < def test_php_application_fastcgi_finish_request(self, temp_dir): --- > def test_php_application_fastcgi_finish_request(self, unit_pid): 103,104c103 < with open(temp_dir + '/unit.pid', 'r') as f: < pid = f.read().rstrip() --- > os.kill(unit_pid, signal.SIGUSR1); 106c105 < call(['kill', '-s', 'USR1', pid]) --- > errs = self.findall(r'Error in fastcgi_finish_request') 108,109c107 < with open(temp_dir + '/unit.log', 'r', errors='ignore') as f: < errs = re.findall(r'Error in fastcgi_finish_request', f.read()) --- > assert len(errs) == 0, 'no error' 111,113c109 < assert len(errs) == 0, 'no error' < < def test_php_application_fastcgi_finish_request_2(self, temp_dir): --- > def test_php_application_fastcgi_finish_request_2(self, unit_pid): 120,121c116 < with open(temp_dir + '/unit.pid', 'r') as f: < pid = f.read().rstrip() --- > os.kill(unit_pid, signal.SIGUSR1); 123c118 < call(['kill', '-s', 'USR1', pid]) --- > errs = self.findall(r'Error in fastcgi_finish_request') 125,126c120 < with open(temp_dir + '/unit.log', 'r', errors='ignore') as f: < errs = re.findall(r'Error in fastcgi_finish_request', f.read()) --- > assert len(errs) == 0, 'no error' 128,129d121 < assert len(errs) == 0, 'no error' < 541c533 < def test_php_application_error_log(self, temp_dir): --- > def test_php_application_error_log(self): 554,555c546 < with open(temp_dir + '/unit.log', 'r', errors='ignore') as f: < errs = re.findall(pattern, f.read()) --- > errs = self.findall(pattern) 557c548 < assert len(errs) == 2, 'error_log count' --- > assert len(errs) == 2, 'error_log count' 559,561c550,552 < date = errs[0].split('[')[0] < date2 = errs[1].split('[')[0] < assert date != date2, 'date diff' --- > date = errs[0].split('[')[0] > date2 = errs[1].split('[')[0] > assert date != date2, 'date diff'