def test_get_witness_by_account(self): lcc.set_step("Get witness by account") self.send_request(self.get_request(self.__get_witness_by_account), self.__identifier) self.__resp = self.get_response() lcc.set_step("Check witness by account") check_that_in( self.__resp["result"], "id", is_str("1.6.0"), "witness_account", is_str("1.2.0"), "last_aslot", is_integer(), "signing_key", is_str("ECHO1111111111111111111111111111111114T1Anm"), "pay_vb", is_str("1.13.1"), "vote_id", is_str("1:0"), "total_votes", is_integer(0), "url", is_str(""), "total_missed", is_integer(0), "last_confirmed_block_num", is_integer(), "ed_signing_key", is_str( "0000000000000000000000000000000000000000000000000000000000000000" ))
def test_get_witness_count(self): lcc.set_step("Get witness count") self.send_request(self.get_request(self.__get_witness_count), self.__identifier) self.__resp = self.get_response() lcc.set_step("Check get witness count") check_that("'witness count'", self.__resp["result"], is_integer(1))
def test_get_account_count(self): lcc.set_step("Get account count") self.send_request(self.get_request(self.__get_account_count), self.__identifier) self.__resp = self.get_response() lcc.set_step("Check get account count") check_that("'account count'", self.__resp["result"], is_integer(29))
def test_get_asset_holders_count(self): lcc.set_step("Get all asset holders") self.get_holders() for asset in range(len(self.resp_all_asset_holders["result"])): lcc.set_step("Get asset_id and count of holders") param = [self.resp_all_asset_holders["result"][asset]["asset_id"]] holders_count = self.resp_all_asset_holders["result"][asset][ "count"] lcc.log_info("Asset id = {}, holders count = {}".format( param, holders_count)) lcc.set_step("Check count of holders") self.send_request( self.get_request(self.__get_all_asset_holders_count, param), self.__identifier) self.__resp = self.get_response() check_that("'count of holders'", self.__resp["result"], is_integer(holders_count))