Source

django-output-validator / output_validator / middleware.py

Full commit
1
2
3
4
5
6
7
8
from output_validator.models import ValidationFailure


class ValidatorMiddleware(object):
    def process_response(self, request, response):
        if response.status_code == 200:
            ValidationFailure.do_validation(request, response)
        return response