def test_fund(self): print dr = get_fund_retriever() self.assertIsNotNone(dr) self.assertAlmostEqual( dr.get_value("06041290000106", "2015-01-23"), 5.6174202 ) self.assertAlmostEqual( dr.get_value("06041290000106", "2014-12-31"), 5.610184 )
def __init__(self, name): FundShare.__init__(self, name) self.retriever = retriever.get_fund_retriever() self.category = MainCategories.Stocks
def __init__(self, name, subcat): assert StocksCategories[subcat] is not None, "Subcategory: %s" % subcat FundShare.__init__(self, name) self.retriever = retriever.get_fund_retriever() self.category = MainCategories.Stocks self.subcategory = StocksCategories[subcat]
def __init__(self, name): FundShare.__init__(self, name) self.retriever = retriever.get_fund_retriever() self.category = MainCategories.Other