import queue
import unittest2
from htr.core.configuration import ConfigManager
from htr.core.data.handler import CsvDataHandler


class TestHistDataHandler(unittest2.TestCase):
    __test__ = True

    def setUp(self):
        self.context = ConfigManager('config.json').get_context()
        self.events = queue.Queue()

    def test_init(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.assertEqual(1, len(self.dhandler.dframes['eur/AUD']))

    def test_get_dframes(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.dhandler.update_bars()
        print(self.dhandler.get_latest_bar('eur/AUD'))

    def tearDown(self):
        pass


if __name__ == '__main__':
    unittest2.main()

872e85a30543f54f51930f65606d0540edf15181
<mask token>


class TestHistDataHandler(unittest2.TestCase):
    <mask token>

    def setUp(self):
        self.context = ConfigManager('config.json').get_context()
        self.events = queue.Queue()

    def test_init(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.assertEqual(1, len(self.dhandler.dframes['eur/AUD']))

    def test_get_dframes(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.dhandler.update_bars()
        print(self.dhandler.get_latest_bar('eur/AUD'))

    def tearDown(self):
        pass


<mask token>

<mask token>


class TestHistDataHandler(unittest2.TestCase):
    __test__ = True

    def setUp(self):
        self.context = ConfigManager('config.json').get_context()
        self.events = queue.Queue()

    def test_init(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.assertEqual(1, len(self.dhandler.dframes['eur/AUD']))

    def test_get_dframes(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.dhandler.update_bars()
        print(self.dhandler.get_latest_bar('eur/AUD'))

    def tearDown(self):
        pass


<mask token>

<mask token>


class TestHistDataHandler(unittest2.TestCase):
    __test__ = True

    def setUp(self):
        self.context = ConfigManager('config.json').get_context()
        self.events = queue.Queue()

    def test_init(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.assertEqual(1, len(self.dhandler.dframes['eur/AUD']))

    def test_get_dframes(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.dhandler.update_bars()
        print(self.dhandler.get_latest_bar('eur/AUD'))

    def tearDown(self):
        pass


if __name__ == '__main__':
    unittest2.main()

import queue
import unittest2
from htr.core.configuration import ConfigManager
from htr.core.data.handler import CsvDataHandler


class TestHistDataHandler(unittest2.TestCase):
    __test__ = True

    def setUp(self):
        self.context = ConfigManager('config.json').get_context()
        self.events = queue.Queue()

    def test_init(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.assertEqual(1, len(self.dhandler.dframes['eur/AUD']))

    def test_get_dframes(self):
        self.dhandler = CsvDataHandler(self.context, self.events)
        self.dhandler.update_bars()
        print(self.dhandler.get_latest_bar('eur/AUD'))

    def tearDown(self):
        pass


if __name__ == '__main__':
    unittest2.main()
