def test_docinfo(self):
    doc_info_results = [['tests/samples/bug11.pdf', {'Producer': 'Mac OS X 10.9.3 Quartz PDFContext', 'Title': u'☭😜💩Unicode is fun!', 'Author': 'Russkel', 'Creator': 'Firefox', 'ModDate': "D:20140528141914+08'00'", 'CreationDate': 'D:20140528061106Z', 'Subject': ''}], ['tests/samples/bug15.pdf', {'Producer': 'Mac OS X 10.9.3 Quartz PDFContext', 'Author': 'Brepols Publishers', 'Creator': 'PDFsharp 1.2.1269-g (www.pdfsharp.com)', 'AAPL_Keywords': "[u'Brepols', u'Publishers', u'CTLO']", 'Title': 'Exporter', 'ModDate': "D:20140614192741Z00'00'", 'Keywords': 'Brepols, Publishers, CTLO', 'CreationDate': "D:20140614192741Z00'00'", 'Subject': 'Extrait de la Library of Latin Texts - Series A'}], ['tests/samples/bug17.pdf', {'CreationDate': 'D:20140328164512Z', 'Creator': 'Adobe InDesign CC (Macintosh)', 'ModDate': 'D:20140328164513Z', 'Producer': 'Adobe PDF Library 10.0.1', 'Trapped': '/False'}]]
    for (file_path, expected_results) in doc_info_results:
        pdf = pdfquery.PDFQuery(file_path)
        pdf.load(None)
        self.assertDictEqual(dict(pdf.tree.getroot().attrib), expected_results)
def test_docinfo(self):
    doc_info_results = [['tests/samples/bug11.pdf', {'Producer': 'Mac OS X 10.9.3 Quartz PDFContext', 'Title': u'☭😜💩Unicode is fun!', 'Author': 'Russkel', 'Creator': 'Firefox', 'ModDate': "D:20140528141914+08'00'", 'CreationDate': 'D:20140528061106Z', 'Subject': }], ['tests/samples/bug15.pdf', {'Producer': 'Mac OS X 10.9.3 Quartz PDFContext', 'Author': 'Brepols Publishers', 'Creator': 'PDFsharp 1.2.1269-g (www.pdfsharp.com)', 'AAPL_Keywords': "[u'Brepols', u'Publishers', u'CTLO']", 'Title': 'Exporter', 'ModDate': "D:20140614192741Z00'00'", 'Keywords': 'Brepols, Publishers, CTLO', 'CreationDate': "D:20140614192741Z00'00'", 'Subject': 'Extrait de la Library of Latin Texts - Series A'}], ['tests/samples/bug17.pdf', {'CreationDate': 'D:20140328164512Z', 'Creator': 'Adobe InDesign CC (Macintosh)', 'ModDate': 'D:20140328164513Z', 'Producer': 'Adobe PDF Library 10.0.1', 'Trapped': '/False'}]]
    for (file_path, expected_results) in doc_info_results:
        pdf = pdfquery.PDFQuery(file_path)
        pdf.load(None)
        self.assertDictEqual(dict(pdf.tree.getroot().attrib), expected_results)