From 1e86e640b585f8fc3ebd98d80df7bc7766f85204 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 07 2016 21:21:13 +0000 Subject: Fix issue when running the tests on jenkins with sqlite and log error when querying faitout --- diff --git a/tests/__init__.py b/tests/__init__.py index 383f21d..fcfec19 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -49,7 +49,8 @@ if os.environ.get('BUILD_ID'): if req.status_code == 200: DB_PATH = req.text print 'Using faitout at: %s' % DB_PATH - except: + except Exception as err: + print 'Error while querying faitout:', err pass # Remove the log handlers for the tests diff --git a/tests/test_pagure_lib.py b/tests/test_pagure_lib.py index a34c77f..6e62327 100644 --- a/tests/test_pagure_lib.py +++ b/tests/test_pagure_lib.py @@ -2465,13 +2465,14 @@ class PagureLibtests(tests.Modeltests): self.assertTrue(watch) # Entry into watchers table - pagure.lib.update_watch_status( + msg = pagure.lib.update_watch_status( session=self.session, project=project, user='pingou', - watch='0', + watch=0, ) self.session.commit() + self.assertEqual(msg, 'You are no longer watching this repo.') # From watchers table watch = pagure.lib.is_watching(