'The initialisation of the class will open the three
test CSV files, then merge and sort them. They will
then be stored in a member "tick_stream". This will
be used for streaming the ticks.'

def test_stream_all_ticks(self):

    self.price_handler.stream_next()
    self.assertEqual(self.price_handler.tickers['GOOG']['timestamp'].strftime('%d-%m-%Y    %H:%M:%S.%f'), '01-02-2016    00:00:01.358000')
    self.assertEqual(PriceParser.display(self.price_handler.tickers['GOOG']['bid'], 5), 683.56)
    self.assertEqual(PriceParser.display(self.price_handler.tickers['GOOG']['ask'], 5), 683.58)
    self.price_handler.stream_next()
    self.assertEqual(self.price_handler.tickers['AMZN']['timestamp'].strftime('%d-%m-%Y    %H:%M:%S.%f'), '01-02-2016    00:00:01.562000')
    self.assertEqual(PriceParser.display(self.price_handler.tickers['AMZN']['bid'], 5), 502.10001)
    self.assertEqual(PriceParser.display(self.price_handler.tickers['AMZN']['ask'], 5), 502.11999)
    self.price_handler.stream_next()
    self.assertEqual(self.price_handler.tickers['MSFT']['timestamp'].strftime('%d-%m-%Y    %H:%M:%S.%f'), '01-02-2016    00:00:01.578000')
    self.assertEqual(PriceParser.display(self.price_handler.tickers['MSFT']['bid'], 5), 50.14999)
    self.assertEqual(PriceParser.display(self.price_handler.tickers['MSFT']['ask'], 5), 50.17001)
    for i in range(4, 11):
        self.price_handler.stream_next()
    self.assertEqual(self.price_handler.tickers['GOOG']['timestamp'].strftime('%d-%m-%Y    %H:%M:%S.%f'), '01-02-2016    00:00:05.215000')
    self.assertEqual(PriceParser.display(self.price_handler.tickers['GOOG']['bid'], 5), 683.56001)
    self.assertEqual(PriceParser.display(self.price_handler.tickers['GOOG']['ask'], 5), 683.57999)
    for i in range(11, 21):
        self.price_handler.stream_next()
    self.assertEqual(self.price_handler.tickers['MSFT']['timestamp'].strftime('%d-%m-%Y    %H:%M:%S.%f'), '01-02-2016    00:00:09.904000')
    self.assertEqual(PriceParser.display(self.price_handler.tickers['MSFT']['bid'], 5), 50.15)
    self.assertEqual(PriceParser.display(self.price_handler.tickers['MSFT']['ask'], 5), 50.17)
    for i in range(21, 31):
        self.price_handler.stream_next()
    self.assertEqual(self.price_handler.tickers['AMZN']['timestamp'].strftime('%d-%m-%Y    %H:%M:%S.%f'), '01-02-2016    00:00:14.616000')
    self.assertEqual(PriceParser.display(self.price_handler.tickers['AMZN']['bid'], 5), 502.10015)
    self.assertEqual(PriceParser.display(self.price_handler.tickers['AMZN']['ask'], 5), 502.11985)
