Skip to content

Commit

Permalink
✅ fix test for when indy_credx is installed or not
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed Feb 7, 2024
1 parent 72ce24f commit c69c713
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ def handle(self):
}
)
rev_reg_delta = credx_module.RevocationRegistryDelta.load(rev_reg_delta_json)
rev_reg_delta.to_json.return_value = rev_reg_delta_json

if hasattr(rev_reg_delta.to_json, "return_value"):
# if indy_credx is not installed, then we're dealing with a mocked method
# therefore, set the return_value to avoid MagicMock being passed to json.loads
rev_reg_delta.to_json.return_value = rev_reg_delta_json

TEST_GENESIS_TXN = "test_genesis_txn"
rec = IssuerRevRegRecord(
Expand Down

0 comments on commit c69c713

Please sign in to comment.