Make hooks specify files. Optionally allow config to override manifest.

This commit is contained in:
Anthony Sottile 2014-06-05 18:37:33 -07:00
parent 0ec9020346
commit 96174deac6
25 changed files with 81 additions and 50 deletions

View file

@ -58,7 +58,7 @@ def up_to_date_repo(python_hooks_repo):
config = OrderedDict((
('repo', python_hooks_repo),
('sha', get_head_sha(python_hooks_repo)),
('hooks', [OrderedDict((('id', 'foo'), ('files', '')))]),
('hooks', [OrderedDict((('id', 'foo'),))]),
))
wrapped_config = apply_defaults([config], CONFIG_JSON_SCHEMA)
validate_config_extra(wrapped_config)
@ -147,7 +147,7 @@ def hook_disappearing_repo(python_hooks_repo):
config = OrderedDict((
('repo', python_hooks_repo),
('sha', get_head_sha(python_hooks_repo)),
('hooks', [OrderedDict((('id', 'foo'), ('files', '')))]),
('hooks', [OrderedDict((('id', 'foo'),))]),
))
config_wrapped = apply_defaults([config], CONFIG_JSON_SCHEMA)
validate_config_extra(config_wrapped)