code: def test_create_hooks(self, scm, dvc):
      dvc.install()
  
      hooks_with_commands = [
          ("post-checkout", "exec dvc git-hook post-checkout"),
          ("pre-commit", "exec dvc git-hook pre-commit"),
          ("pre-push", "exec dvc git-hook pre-push"),
      ]
  
      for fname, command in hooks_with_commands:
          hook_path = self._hook(fname)
          assert hook_path.is_file()
          assert command in hook_path.read_text()
  
file_path: dvc/tests/func/test_install.py
imports: import os
  import pathlib
  import sys
  import pytest
  from git import GitCommandError
  from dvc.exceptions import DvcException
  from dvc_data.hashfile.hash import file_md5
  from tests.func.parsing.test_errors import escape_ansi
label_desc: Use image node_id 2 for calling the TestInstall obj's underlying member method code with example usage: obj.test_create_hooks(scm, dvc) without return types