class_docstr: Test invocation of a custom component object.
class_docstr_tok: ["Test","invocation","of","a","custom","component","object","."]
code: def test_bytes_args(self):
      self.test_component(foo=b"foo", bar=b"bar")
      proto = self.get_delta_from_queue().new_element.component_instance
      self.assertJSONEqual(
          {"key": None, "default": None}, proto.json_args
      )
      self.assertEqual(2, len(proto.special_args))
      self.assertEqual(
          _serialize_bytes_arg("foo", b"foo"),
          proto.special_args[0],
      )
      self.assertEqual(
          _serialize_bytes_arg("bar", b"bar"),
          proto.special_args[1],
      )
  
imports: import json
  import os
  import unittest
  from typing import Any
  from unittest import mock
  from unittest.mock import MagicMock, patch
  import pandas
  import pytest
  import streamlit
  import streamlit.components.v1
  from streamlit.components.v1 import component_arrow
  from streamlit.components.v1.components import ComponentRegistry, CustomComponent
  from streamlit.errors import DuplicateWidgetID, StreamlitAPIException
  from streamlit.proto.Components_pb2 import SpecialArg
  from streamlit.type_util import to_bytes
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 6 for calling the InvokeComponentTest obj's underlying member method code with example usage: obj.test_bytes_args() without return types