Example #1
0
 def __init__(self,
              datapath_args=[],
              status_code=200,
              file_read_args='r',
              text=None,
              *args):
     self.status_code = status_code
     if text is not None:
         self.text = text
     else:
         with open(datapath(*datapath_args), file_read_args) as f:
             self.text = f.read()
 def __init__(self, *args):
     self.status_code = 200
     with open(datapath('filings', 'aapl_10q_filings.xml')) as f:
         self.text = f.read()
 def __init__(self, *args):
     self.status_code = 200
     with open(datapath("CIK", "cik_not_found.html"), 'rb') as f:
         self.text = f.read()
Example #4
0
 def _mock_daily_idx_file(*args, **kwargs):
     with open(datapath("filings", "daily", "master.20181231.idx")) as f:
         return f.read()
 def __init__(self, *args, **kwargs):
     self.status_code = 200
     with open(datapath('CIK', 'single_filing_page.html')) as f:
         self.text = f.read()
 def __init__(self, *args, **kwargs):
     self.status_code = 200
     with open(datapath('CIK', 'cik_multiple_results.html')) as f:
         self.text = f.read()
 def __init__(self, *args, **kwargs):
     self.status_code = 200
     with open(datapath('CIK', 'single_cik_search_result.html'), encoding='iso-8859-1') as f:
         self.text = f.read()
 def __init__(self, *args, **kwargs):
     self.status_code = 200
     with open(datapath('CIK', 'cik_not_found.html')) as f:
         self.text = f.read()
Example #9
0
 def _mock_master_idx_file(*args, **kwargs):
     with open(datapath("filings", "master", "master.idx")) as f:
         return f.read()
Example #10
0
 def __init__(self, *args, **kwargs):
     with gzip.open(datapath("utils", "cik_map.json.gz"), 'rt') as f:
         self.text = f.read()
Example #11
0
 def __init__(self, *args):
     self.status_code = 200
     with open(datapath("filings", "daily",
                        "daily_index_2018_QTR4.htm")) as f:
         self.text = f.read()
Example #12
0
 def __init__(self, *args):
     self.status_code = 200
     with open(datapath("CIK", "cik_multiple_results.html"), 'rb') as f:
         self.text = f.read()
Example #13
0
 def __init__(self, *args):
     self.status_code = 200
     with open(datapath("CIK", "single_cik_search_result.html"), 'rb') as f:
         self.text = f.read()