code: def test_repr_html_ok():
      with mock.patch(
          "tslumen.jinja_utils.create_jinja_env", autospec=True
      ) as jinja:
          env = mock.create_autospec(spec=jinja2.Environment)
          env.get_template.return_value = jinja2.Template(
              "name={{obj.name}}|oid={{oid}}"
          )
          jinja.return_value = env
  
          @repr_html
          class Dummy:
              name = "foo"
  
          assert getattr(Dummy, "_repr_html_")
          assert callable(Dummy._repr_html_)
          assert isinstance(Dummy()._repr_html_(), str)
          assert "name=foo" in Dummy()._repr_html_()
          assert "oid=" in Dummy()._repr_html_()
  
file_path: tslumen/tests/unit/test_misc.py
imports: import pytest
  import mock
  from inspect import isclass
  import jinja2
  from tslumen.misc import lazyproperty, repr_html, import_error_function, import_error_class, import_error_module
label_desc: Use image node_id 2 for calling a global function with example usage: test_repr_html_ok() without return types