@@ -272,7 +272,7 @@ def test_always_run(
272272 cap_out , repo_with_passing_hook , mock_out_store_directory ,
273273):
274274 with modify_config () as config :
275- config [0 ]['hooks' ][0 ]['always_run' ] = True
275+ config ['repos' ][ 0 ]['hooks' ][0 ]['always_run' ] = True
276276 _test_run (
277277 cap_out ,
278278 repo_with_passing_hook ,
@@ -288,7 +288,7 @@ def test_always_run_alt_config(
288288):
289289 repo_root = '.'
290290 config = read_config (repo_root )
291- config [0 ]['hooks' ][0 ]['always_run' ] = True
291+ config ['repos' ][ 0 ]['hooks' ][0 ]['always_run' ] = True
292292 alt_config_file = 'alternate_config.yaml'
293293 add_config_to_repo (repo_root , config , config_file = alt_config_file )
294294
@@ -428,7 +428,7 @@ def test_multiple_hooks_same_id(
428428 with cwd (repo_with_passing_hook ):
429429 # Add bash hook on there again
430430 with modify_config () as config :
431- config [0 ]['hooks' ].append ({'id' : 'bash_hook' })
431+ config ['repos' ][ 0 ]['hooks' ].append ({'id' : 'bash_hook' })
432432 stage_a_file ()
433433
434434 ret , output = _do_run (cap_out , repo_with_passing_hook , _get_opts ())
@@ -455,7 +455,7 @@ def test_stdout_write_bug_py26(
455455):
456456 with cwd (repo_with_failing_hook ):
457457 with modify_config () as config :
458- config [0 ]['hooks' ][0 ]['args' ] = ['☃' ]
458+ config ['repos' ][ 0 ]['hooks' ][0 ]['args' ] = ['☃' ]
459459 stage_a_file ()
460460
461461 install (Runner (repo_with_failing_hook , C .CONFIG_FILE ))
@@ -505,7 +505,7 @@ def test_lots_of_files(mock_out_store_directory, tempdir_factory):
505505 with cwd (git_path ):
506506 # Override files so we run against them
507507 with modify_config () as config :
508- config [0 ]['hooks' ][0 ]['files' ] = ''
508+ config ['repos' ][ 0 ]['hooks' ][0 ]['files' ] = ''
509509
510510 # Write a crap ton of files
511511 for i in range (400 ):
@@ -660,7 +660,7 @@ def test_local_hook_fails(
660660def modified_config_repo (repo_with_passing_hook ):
661661 with modify_config (repo_with_passing_hook , commit = False ) as config :
662662 # Some minor modification
663- config [0 ]['hooks' ][0 ]['files' ] = ''
663+ config ['repos' ][ 0 ]['hooks' ][0 ]['files' ] = ''
664664 yield repo_with_passing_hook
665665
666666
@@ -721,8 +721,8 @@ def test_pass_filenames(
721721 expected_out ,
722722):
723723 with modify_config () as config :
724- config [0 ]['hooks' ][0 ]['pass_filenames' ] = pass_filenames
725- config [0 ]['hooks' ][0 ]['args' ] = hook_args
724+ config ['repos' ][ 0 ]['hooks' ][0 ]['pass_filenames' ] = pass_filenames
725+ config ['repos' ][ 0 ]['hooks' ][0 ]['args' ] = hook_args
726726 stage_a_file ()
727727 ret , printed = _do_run (
728728 cap_out , repo_with_passing_hook , _get_opts (verbose = True ),
0 commit comments