@@ -845,9 +845,11 @@ def _deregister():
845845
846846        stake_addr_info  =  cluster .g_query .get_stake_addr_info (pool_user_rewards .stake .address )
847847
848-         assert  stake_addr_info .vote_delegation  ==  governance_utils .get_drep_cred_name (
849-             drep_id = drep1 .drep_id 
850-         ), "Votes are NOT delegated to the correct DRep 1 placed at last of certificates list." 
848+         assert  governance_utils .get_drep_cred_name_from_addr_info (
849+             addr_info = stake_addr_info 
850+         ) ==  governance_utils .get_drep_cred_name (drep_id = drep1 .drep_id ), (
851+             "Votes are NOT delegated to the correct DRep 1 placed at last of certificates list." 
852+         )
851853        reqc .cip087 .success ()
852854
853855    @allure .link (helpers .get_vcs_link ()) 
@@ -1163,9 +1165,11 @@ def _deregister():
11631165            f"Stake address is NOT registered: { pool_user_rewards .stake .address }  
11641166        )
11651167        reqc .cli035 .start (url = helpers .get_vcs_link ())
1166-         assert  stake_addr_info .vote_delegation  ==  governance_utils .get_drep_cred_name (
1167-             drep_id = drep_id 
1168-         ), "Votes are NOT delegated to the correct DRep" 
1168+         assert  governance_utils .get_drep_cred_name_from_addr_info (
1169+             addr_info = stake_addr_info 
1170+         ) ==  governance_utils .get_drep_cred_name (drep_id = drep_id ), (
1171+             "Votes are NOT delegated to the correct DRep" 
1172+         )
11691173        reqc .cli035 .success ()
11701174
11711175        out_utxos  =  cluster .g_query .get_utxo (tx_raw_output = tx_output )
@@ -1359,9 +1363,11 @@ def _deregister():
13591363        stake_addr_info  =  cluster .g_query .get_stake_addr_info (pool_user_wpr .stake .address )
13601364        assert  stake_addr_info .delegation , f"Stake address was not delegated yet: { stake_addr_info }  
13611365        assert  pool_id  ==  stake_addr_info .delegation , "Stake address delegated to wrong pool" 
1362-         assert  stake_addr_info .vote_delegation  ==  governance_utils .get_drep_cred_name (
1363-             drep_id = drep_id 
1364-         ), "Votes are NOT delegated to the correct DRep" 
1366+         assert  governance_utils .get_drep_cred_name_from_addr_info (
1367+             addr_info = stake_addr_info 
1368+         ) ==  governance_utils .get_drep_cred_name (drep_id = drep_id ), (
1369+             "Votes are NOT delegated to the correct DRep" 
1370+         )
13651371
13661372        # Check the expected balance 
13671373        out_utxos  =  cluster .g_query .get_utxo (tx_raw_output = tx_output )
@@ -1518,9 +1524,11 @@ def _deregister():
15181524        stake_addr_info_deleg1  =  cluster .g_query .get_stake_addr_info (
15191525            pool_user_rewards .stake .address 
15201526        )
1521-         assert  stake_addr_info_deleg1 .vote_delegation  ==  governance_utils .get_drep_cred_name (
1522-             drep_id = drep1 .drep_id 
1523-         ), "Votes are NOT delegated to the correct DRep 1" 
1527+         assert  governance_utils .get_drep_cred_name_from_addr_info (
1528+             addr_info = stake_addr_info_deleg1 
1529+         ) ==  governance_utils .get_drep_cred_name (drep_id = drep1 .drep_id ), (
1530+             "Votes are NOT delegated to the correct DRep 1" 
1531+         )
15241532
15251533        # Change delegation to second DRep 
15261534
@@ -1549,9 +1557,11 @@ def _deregister():
15491557        stake_addr_info_deleg2  =  cluster .g_query .get_stake_addr_info (
15501558            pool_user_rewards .stake .address 
15511559        )
1552-         assert  stake_addr_info_deleg2 .vote_delegation  ==  governance_utils .get_drep_cred_name (
1553-             drep_id = drep2 .drep_id 
1554-         ), "Votes are NOT changed to the correct DRep 2" 
1560+         assert  governance_utils .get_drep_cred_name_from_addr_info (
1561+             addr_info = stake_addr_info_deleg2 
1562+         ) ==  governance_utils .get_drep_cred_name (drep_id = drep2 .drep_id ), (
1563+             "Votes are NOT changed to the correct DRep 2" 
1564+         )
15551565        reqc .cip086 .success ()
15561566
15571567        # Retire the first DRep 
@@ -1588,9 +1598,11 @@ def _deregister():
15881598        else :
15891599            if  not  stake_addr_info_ret .vote_delegation :
15901600                issues .ledger_4772 .finish_test ()
1591-             assert  stake_addr_info_ret .vote_delegation  ==  governance_utils .get_drep_cred_name (
1592-                 drep_id = drep2 .drep_id 
1593-             ), "Votes are no longer delegated to DRep 2!" 
1601+             assert  governance_utils .get_drep_cred_name_from_addr_info (
1602+                 addr_info = stake_addr_info_ret 
1603+             ) ==  governance_utils .get_drep_cred_name (drep_id = drep2 .drep_id ), (
1604+                 "Votes are no longer delegated to DRep 2!" 
1605+             )
15941606        reqc .int002 .success ()
15951607
15961608
@@ -1707,9 +1719,11 @@ def _delegate_addr(
17071719            assert  stake_addr_info .address , (
17081720                f"Stake address is NOT registered: { pool_user .stake .address }  
17091721            )
1710-             assert  stake_addr_info .vote_delegation  ==  governance_utils .get_drep_cred_name (
1711-                 drep_id = drep_reg .drep_id 
1712-             ), "Votes are NOT delegated to the correct DRep" 
1722+             assert  governance_utils .get_drep_cred_name_from_addr_info (
1723+                 addr_info = stake_addr_info 
1724+             ) ==  governance_utils .get_drep_cred_name (drep_id = drep_reg .drep_id ), (
1725+                 "Votes are NOT delegated to the correct DRep" 
1726+             )
17131727
17141728            out_utxos  =  cluster .g_query .get_utxo (tx_raw_output = tx_output )
17151729            assert  (
0 commit comments