예제 #1
0
class GuornClientTest(unittest.TestCase):
    def setUp(self):
        config = ConfigParser()
        dir_path = os.path.dirname(os.path.realpath(__file__))
        config.readfp(codecs.open('{}/../../config/config.ini'.format(dir_path), encoding="utf_8_sig"))
        self._guorn_client = GuornClient(**dict(config.items('Guorn')))
        self._guorn_client.login()

    def test_query_portfolio(self):
        portfolio = self._guorn_client.query_portfolio()
        print(portfolio)
예제 #2
0
 def __create_guorn_sync_job(self):
     section = 'Guorn'
     options = self.__build_options(section)
     client_aliases = self.__filter_client_aliases(section)
     quant_client = GuornClient(**options)
     return OnlineQuantSyncJob(self._client, quant_client, client_aliases,
                               '{}SyncJob'.format(section), **options)
예제 #3
0
 def setUp(self):
     config = ConfigParser()
     dir_path = os.path.dirname(os.path.realpath(__file__))
     config.readfp(codecs.open('{}/../../config/config.ini'.format(dir_path), encoding="utf_8_sig"))
     self._guorn_client = GuornClient(**dict(config.items('Guorn')))
     self._guorn_client.login()