def test_create_time_series(self): records = [ (datetime.date(2015, 9, 30), datetime.date(2002, 12, 31), 1), (datetime.date(2015, 9, 30), datetime.date(2001, 12, 31), 2), (datetime.date(2015, 8, 31), datetime.date(2001, 12, 31), 3), ] time_series = TimeSeries.create(records).get() self.assertEqual(time_series, [ (datetime.date(2001, 12, 31), 2), (datetime.date(2002, 12, 31), 1), ])
def __init_value(self, param): output = {} database = Database() for account in param['account_list']: output[account] = TimeSeries.create(database.get(account, param)) return output
def __init_value(self, param): output = {} database = Database() for account in param["account_list"]: output[account] = TimeSeries.create(database.get(account, param)) return output