예제 #1
0
 def test_supporting_docs(self):
     """Should filter the results to the appropriate types"""
     self.expect_json_http({'documents': [
         dict(documentId='1', documentType='Notice', title='a'),
         dict(documentId='2', documentType='Other', title='b'),
         dict(documentId='3', documentType='Final Rule', title='c'),
         dict(documentId='4', documentType='Supporting & Related Material',
              title='d')]})
     self.assertEqual(
         list(regs_gov.supporting_docs('docket')),
         [regs_gov.RegsGovDoc('2', 'b'), regs_gov.RegsGovDoc('4', 'd')])
예제 #2
0
 def supporting_documents(self):
     """:rtype: list of regs_gov.RegsGovDoc"""
     return [
         regs_gov.RegsGovDoc(**s.attrib)
         for s in self.xpath('//EREGS_SUPPORTING_DOC')
     ]