def test_recoverable_problem(self): '''recoverable_problem with valid data''' self.call_recoverable_problem('hello\0there') path = self.wait_for_report() with open(path, 'rb') as report_path: report = apport.report.Report() report.load(report_path) self.assertEqual(report['hello'], 'there') self.assertTrue('Pid:\t%d' % os.getpid() in report['ProcStatus'])
def test_recoverable_problem(self): """recoverable_problem with valid data""" self.call_recoverable_problem("hello\0there") path = self.wait_for_report() with open(path, "rb") as report_path: report = apport.report.Report() report.load(report_path) self.assertEqual(report["hello"], "there") self.assertTrue("Pid:\t%d" % os.getpid() in report["ProcStatus"])
def test_recoverable_problem_dupe_sig(self): '''recoverable_problem duplicate signature includes package''' self.call_recoverable_problem('Package\0test\0DuplicateSignature\0ds') path = self.wait_for_report() with open(path, 'rb') as report_path: report = apport.report.Report() report.load(report_path) self.assertEqual(report['DuplicateSignature'], 'test:ds') self.assertTrue('Pid:\t%d' % os.getpid() in report['ProcStatus'])