Ejemplo n.º 1
0
 def setUp(self):
     turn_on_request_caching()
     test_filing_path = os.path.join(TEST_DOCS_DIR, 'aapl-20121229.xml')
     with open(test_filing_path) as f:
         test_statement_xml_dict = xmltodict.parse(f.read())
         self.xbrl_dict = test_statement_xml_dict['xbrl']
     self.xbrl_doc = XBRLDocument(None)
     self.xbrl_doc._xbrl_dict_ = self.xbrl_dict
Ejemplo n.º 2
0
 def from_xbrl_url(cls, filing_date, xbrl_url):
     '''constructor.'''
     document = XBRLDocument(xbrl_url=xbrl_url)
     return cls(filing_date=filing_date, document=document)
Ejemplo n.º 3
0
 def test_document_downloading(self):
     doc = XBRLDocument(
         'http://www.sec.gov/Archives/edgar/data/320193/000119312513022339/aapl-20121229.xml'
     )
     self.assertDictEqual(doc._xbrl_dict, self.xbrl_dict)