class_docstr: Unit test for our bytea format parser.
class_docstr_tok: ["Unit","test","for","our","bytea","format","parser","."]
code: def test_full_hex(self, upper=False):
      buf = "".join(("%02x" % i) for i in range(256))
      if upper:
          buf = buf.upper()
      buf = "\\x" + buf
      rv = self.cast(buf.encode("utf8"))
      self.assertEqual(rv, bytes(range(256)))
  
imports: import string
  import ctypes
  import decimal
  import datetime
  import platform
  from .None import testutils
  import unittest
  from .testutils import ConnectingTestCase, restore_types
  from .testutils import skip_if_crdb
  import psycopg2
  from psycopg2.extensions import AsIs, adapt, register_adapter
label_desc: Use image node_id 7 for calling the ByteaParserTest obj's underlying member method code with example usage: obj.test_full_hex(upper) without return types