Skip to content

Commit

Permalink
Merge pull request #589 from Cornices/dependabot/pip/webob-1.8.8
Browse files Browse the repository at this point in the history
Bump webob from 1.8.7 to 1.8.8
  • Loading branch information
leplatrem authored Sep 12, 2024
2 parents 6cbfd8e + 551ed0c commit 7fd0b88
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 22 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ venusian==3.1.0 \
--hash=sha256:d1fb1e49927f42573f6c9b7c4fcf61c892af8fdcaa2314daa01d9a560b23488d \
--hash=sha256:eb72cdca6f3139a15dc80f9c95d3c10f8a54a0ba881eeef8e2ec5b42d3ee3a95
# via pyramid
webob==1.8.7 \
--hash=sha256:73aae30359291c14fa3b956f8b5ca31960e420c28c1bec002547fb04928cf89b \
--hash=sha256:b64ef5141be559cfade448f044fa45c2260351edcb6a8ef6b7e00c7dcef0c323
webob==1.8.8 \
--hash=sha256:2abc1555e118fc251e705fc6dc66c7f5353bb9fbfab6d20e22f1c02b4b71bcee \
--hash=sha256:b60ba63f05c0cf61e086a10c3781a41fcfe30027753a8ae6d819c77592ce83ea
# via pyramid
zope-deprecation==5.0 \
--hash=sha256:28c2ee983812efb4676d33c7a8c6ade0df191c1c6d652bbbfe6e2eeee067b2d4 \
Expand Down
3 changes: 2 additions & 1 deletion tests/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
# Maybe we're running in python2.7?
from unittest import TestCase # NOQA

from cornice.errors import Errors
from pyramid import testing
from pyramid.httpexceptions import HTTPException
from webob import exc
from webob.dec import wsgify

from cornice.errors import Errors


logger = logging.getLogger("cornice")

Expand Down
3 changes: 2 additions & 1 deletion tests/test_cors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from cornice.service import Service
from pyramid import testing
from pyramid.authentication import BasicAuthAuthenticationPolicy
from pyramid.exceptions import HTTPBadRequest, NotFound
Expand All @@ -11,6 +10,8 @@
from webtest import TestApp
from zope.interface import implementer

from cornice.service import Service

from .support import CatchErrors, TestCase


Expand Down
5 changes: 3 additions & 2 deletions tests/test_errors.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from unittest import mock

from cornice.errors import Errors
from cornice.service import Service
from pyramid import testing
from pyramid.i18n import TranslationString
from webtest import TestApp

from cornice.errors import Errors
from cornice.service import Service

from .support import CatchErrors, TestCase


Expand Down
3 changes: 2 additions & 1 deletion tests/test_imperative_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
from unittest import mock

import pytest
from cornice.resource import add_resource, add_view
from pyramid import testing
from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
from pyramid.httpexceptions import HTTPForbidden, HTTPOk
from pyramid.security import Allow
from webtest import TestApp

from cornice.resource import add_resource, add_view

from .support import CatchErrors, TestCase, dummy_factory


Expand Down
5 changes: 3 additions & 2 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.
from unittest import mock

from cornice import Service
from cornice.pyramidhook import apply_filters
from pyramid import testing
from webtest import TestApp

from cornice import Service
from cornice.pyramidhook import apply_filters

from .support import CatchErrors, TestCase


Expand Down
5 changes: 3 additions & 2 deletions tests/test_renderer.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from unittest import mock

from cornice import CorniceRenderer
from cornice.renderer import JSONError, bytes_adapter
from pyramid.interfaces import IJSONAdapter
from pyramid.renderers import JSON
from zope.interface import providedBy

from cornice import CorniceRenderer
from cornice.renderer import JSONError, bytes_adapter

from .support import TestCase


Expand Down
3 changes: 2 additions & 1 deletion tests/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import json
from unittest import mock

from cornice.resource import resource, view
from pyramid import testing
from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
Expand All @@ -14,6 +13,8 @@
from pyramid.security import Allow
from webtest import TestApp

from cornice.resource import resource, view

from .support import CatchErrors, TestCase, dummy_factory


Expand Down
3 changes: 2 additions & 1 deletion tests/test_resource_callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

import json

from cornice.resource import resource, view
from pyramid import testing
from webtest import TestApp

from cornice.resource import resource, view

from .support import CatchErrors, TestCase


Expand Down
3 changes: 2 additions & 1 deletion tests/test_resource_custom_predicates.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from cornice.resource import resource, view
from pyramid import testing
from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
from webtest import TestApp

from cornice.resource import resource, view

from .support import CatchErrors, TestCase


Expand Down
3 changes: 2 additions & 1 deletion tests/test_resource_traverse.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

from cornice.resource import resource, view
from pyramid import testing
from webtest import TestApp

from cornice.resource import resource, view

from .support import CatchErrors, TestCase


Expand Down
5 changes: 3 additions & 2 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.
from unittest import mock

from pyramid.exceptions import ConfigurationError
from pyramid.interfaces import IRendererFactory

from cornice.resource import resource
from cornice.service import Service, _UnboundView, clear_services, decorate_view, get_services
from cornice.util import func_name
from pyramid.exceptions import ConfigurationError
from pyramid.interfaces import IRendererFactory

from .support import DummyRequest, TestCase

Expand Down
3 changes: 2 additions & 1 deletion tests/test_service_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

from cornice import Service
from pyramid import testing
from webtest import TestApp

from cornice import Service

from .support import CatchErrors, TestCase


Expand Down
6 changes: 4 additions & 2 deletions tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,16 +784,18 @@ def test_no_body_schema(self):
self.assertEqual(len(request.errors), 0)

def test_message_normalizer_no_field_names(self):
from cornice.validators._marshmallow import _message_normalizer
from marshmallow.exceptions import ValidationError

from cornice.validators._marshmallow import _message_normalizer

parsed = _message_normalizer(ValidationError("Test message"))
self.assertEqual({"_schema": ["Test message"]}, parsed)

def test_message_normalizer_field_names(self):
from cornice.validators._marshmallow import _message_normalizer
from marshmallow.exceptions import ValidationError

from cornice.validators._marshmallow import _message_normalizer

parsed = _message_normalizer(ValidationError("Test message", field_names=["test"]))
self.assertEqual({"test": ["Test message"]}, parsed)

Expand Down
4 changes: 3 additions & 1 deletion tests/validationapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.
import json

from cornice import Service
from pyramid.config import Configurator
from pyramid.httpexceptions import HTTPBadRequest

from cornice import Service

from .support import CatchErrors


Expand Down Expand Up @@ -159,6 +160,7 @@ def post7(request):
drop,
null,
)

from cornice.validators import colander_body_validator, colander_validator

COLANDER = True
Expand Down

0 comments on commit 7fd0b88

Please sign in to comment.