diff --git a/tests/test_ubicast_packages_access.py b/tests/test_ubicast_packages_access.py
index e29c4e1f531fcee604d90e102b8b83a6adb64cc7..e5caea741c5d73b9dcdacb584b9e1f5b44dbf261 100755
--- a/tests/test_ubicast_packages_access.py
+++ b/tests/test_ubicast_packages_access.py
@@ -42,6 +42,7 @@ req = requests.get(url)
 if not req.ok:
     print('Request to %s failed (%s):' % (url, req.status_code))
     print(req.text)
+    sys.exit(1)
 else:
     print('Request to %s: OK.' % url)
 
@@ -51,5 +52,6 @@ apt_url = apt_url.replace(api_key, api_key[:8] + '[...]')
 if not req.ok:
     print('Request to %s failed (%s):' % (apt_url, req.status_code))
     print(req.text)
+    sys.exit(1)
 else:
     print('Request to %s: OK.' % apt_url)