From 8a9f8f9ec644c48b12ae8663612005a3b385f9cb Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 20 2015 15:03:48 +0000 Subject: Similarly to the ticket_hook, do not cover what cannot be tested and is safe to ignore --- diff --git a/pagure/hooks/pagure_request_hook.py b/pagure/hooks/pagure_request_hook.py index e25163e..f0bd6be 100644 --- a/pagure/hooks/pagure_request_hook.py +++ b/pagure/hooks/pagure_request_hook.py @@ -102,7 +102,9 @@ class PagureRequestHook(BaseHook): ''' repopath = os.path.join(APP.config['REQUESTS_FOLDER'], project.path) - if not os.path.exists(repopath): + if not os.path.exists(repopath): # pragma: no cover + # We cannot test this as un-existing repo should be catched + # at the set_up() stage flask.abort(404, 'No git repo found') hook_files = os.path.join(