Replace unhexlify() with x() in tests