def test_etag_check_precondition(self, app, method):
        blp = Blueprint("test", __name__)

        with app.test_request_context("/", method=method):
            if method in ["PUT", "PATCH", "DELETE"]:
                with pytest.raises(PreconditionRequired):
                    blp._check_precondition()
            else:
                blp._check_precondition()
    def test_etag_check_precondition(self, app, method):
        blp = Blueprint('test', __name__)

        with app.test_request_context('/', method=method):
            if method in ['PUT', 'PATCH', 'DELETE']:
                with pytest.raises(PreconditionRequired):
                    blp._check_precondition()
            else:
                blp._check_precondition()