[tests] Replace bytes literals with hex literals
Summary:
It's almost impossible to read bytes literals in code, so replace them
with the hex string literal and then convert them to a bytes object
using bytes.fromhex().
This is a backport of core#19253 [2/2]
https://github.com/bitcoin/bitcoin/pull/19253/commits/825fcae484f31182041dfacbf820e818d759b130
Test Plan: ninja check-functional
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D10418