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)
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)
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()