def setUpClass(cls):
     database.drop_db(TEST_DB_NAME)
     cls.test_timestamp = datetime(2015, 12, 18)
     data_file_path = os.path.join(
         os.path.dirname(__file__), 'test_structures_data.txt')
     with open(data_file_path) as fd:
         options._parse_data('SPX', fd.read(), True,
                             TEST_DB_NAME, cls.test_timestamp)
Exemple #2
0
 def test_parse_data_not_eod(self):
     test_date = dates.get_database_timestamp().date()
     quotes = options._parse_data("VIX", self.TEST_DATA, False, TEST_DB_NAME)
     self._check_quotes(quotes, "VIX", test_date, False, 25.22)
     self._check_database_quotes("VIX", 10, test_date, 10, False, 25.22)