code: def test_generic(self):
      hook1 = mock.Mock()
      hook2 = mock.Mock()
  
      write_hooks.register("hook1")(hook1)
      write_hooks.register("hook2")(hook2)
  
      self.cfg = _no_sql_testing_config(
          directives=(
              "\n[post_write_hooks]\n"
              "hooks=hook1,hook2\n"
              "hook1.type=hook1\n"
              "hook1.arg1=foo\n"
              "hook2.type=hook2\n"
              "hook2.arg1=bar\n"
          )
      )
  
      rev = command.revision(self.cfg, message="x")
  
      eq_(
          hook1.mock_calls,
          [
              mock.call(
                  rev.path,
                  {
                      "type": "hook1",
                      "arg1": "foo",
                      "_hook_name": "hook1",
                  },
              )
          ],
      )
      eq_(
          hook2.mock_calls,
          [
              mock.call(
                  rev.path,
                  {
                      "type": "hook2",
                      "arg1": "bar",
                      "_hook_name": "hook2",
                  },
              )
          ],
      )
  
imports: import os
  import sys
  from alembic import command
  from alembic import util
  from alembic.script import write_hooks
  from alembic.testing import assert_raises_message
  from alembic.testing import combinations
  from alembic.testing import eq_
  from alembic.testing import mock
  from alembic.testing import TestBase
  from alembic.testing.env import _get_staging_directory
  from alembic.testing.env import _no_sql_testing_config
  from alembic.testing.env import clear_staging_env
  from alembic.testing.env import staging_env
  from alembic.util import compat
label_desc: Use image node_id 3 for calling the RunHookTest obj's underlying member method code with example usage: obj.test_generic() without return types