'Tests the \'subscribe_ticker\' and \'unsubscribe_ticker\'
methods, and check that they raise exceptions when
appropriate.'

def test_subscribe_unsubscribe(self):

    try:
        self.price_handler.subscribe_ticker('GOOG')
    except Exception as E:
        self.fail(('subscribe_ticker()    raised    %s    unexpectedly' % E))
    self.assertTrue(('GOOG' in self.price_handler.tickers))
    self.assertTrue(('GOOG' in self.price_handler.tickers_data))
    self.price_handler.unsubscribe_ticker('GOOG')
    self.assertTrue(('GOOG' not in self.price_handler.tickers))
    self.assertTrue(('GOOG' not in self.price_handler.tickers_data))
