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._uq_client = UqerClient(**dict(config.items('Uqer')))
class UqerClientTest(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._uq_client = UqerClient(**dict(config.items('Uqer'))) def test_query(self): self._uq_client.login() transactions = self._uq_client.query() self.assertTrue(isinstance(transactions, list))
def __create_uqer_following_job(self): section = 'Uqer' options = self.__build_options(section) client_aliases = self.__filter_client_aliases(section) quant_client = UqerClient(**options) return OnlineQuantFollowingJob(self._client, quant_client, client_aliases, '{}FollowingJob'.format(section), **options)