From ab47d08a38c67d6e974295fb58af753b4e8930ad Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Wed, 8 Nov 2017 18:04:13 -0800 Subject: [PATCH] Make regression test that ensures autoupdate foo keeps everything else --- tests/commands/autoupdate_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/commands/autoupdate_test.py b/tests/commands/autoupdate_test.py index c78af1fb..ee20c7dd 100644 --- a/tests/commands/autoupdate_test.py +++ b/tests/commands/autoupdate_test.py @@ -127,10 +127,12 @@ def test_autoupdate_out_of_date_repo( def test_autoupdate_out_of_date_repo_with_correct_repo_name( out_of_date_repo, in_tmpdir, mock_out_store_directory, ): - # Write out the config - config = make_config_from_repo( + stale_config = make_config_from_repo( out_of_date_repo.path, sha=out_of_date_repo.original_sha, check=False, ) + local_config = config_with_local_hooks() + config = {'repos': [stale_config, local_config]} + # Write out the config write_config('.', config) runner = Runner('.', C.CONFIG_FILE) @@ -141,6 +143,7 @@ def test_autoupdate_out_of_date_repo_with_correct_repo_name( assert ret == 0 assert before != after assert out_of_date_repo.head_sha in after + assert local_config['repo'] in after def test_autoupdate_out_of_date_repo_with_wrong_repo_name(