celery test cleanup

* Alter config so an error will be raised if you forget to mock out a
  celery call in one of your tests
* Remove an unneeded exception type that was masking errors
This commit is contained in:
Leo Hemsted
2017-06-19 14:58:38 +01:00
parent 88a479a4bb
commit ac7665bfc6
8 changed files with 16 additions and 33 deletions

View File

@@ -7,7 +7,6 @@ from sqlalchemy.orm.exc import NoResultFound
from marshmallow import ValidationError
from jsonschema import ValidationError as JsonSchemaValidationError
from app.authentication.auth import AuthError
from app.notifications import SendNotificationToQueueError
class InvalidRequest(Exception):
@@ -90,11 +89,6 @@ def register_errors(blueprint):
current_app.logger.exception(e)
return jsonify(result='error', message="No result found"), 404
@blueprint.errorhandler(SendNotificationToQueueError)
def failed_to_create_notification(e):
current_app.logger.exception(e)
return jsonify(result='error', message=e.message), 500
@blueprint.errorhandler(SQLAlchemyError)
def db_error(e):
current_app.logger.exception(e)