Skip to content

Commit

Permalink
Merge pull request #573 from timgates42/bugfix_typos
Browse files Browse the repository at this point in the history
docs: Fix a few typos
  • Loading branch information
Natim authored Jul 18, 2022
2 parents 15dfca9 + 30a233d commit 06f9de7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/source/schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ Multiple request attributes
~~~~~~~~~~~~~~~~~~~~~~~~~~~


If you have complex use-cases where data has to be validated accross several locations
If you have complex use-cases where data has to be validated across several locations
of the request (like querystring, body etc.), Cornice provides a validator that
takes an additionnal level of mapping for ``body``, ``querystring``, ``path`` or ``headers``
takes an additional level of mapping for ``body``, ``querystring``, ``path`` or ``headers``
instead of the former ``location`` attribute on schema fields.

The ``request.validated`` hences reflects this additional level.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/upgrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ Now any validation library can be used.
Complex Colander validation
---------------------------

If you have complex use-cases where data has to be validated accross several locations
If you have complex use-cases where data has to be validated across several locations
of the request (like querystring, body etc.), Cornice provides a validator that
takes an additionnal level of mapping for ``body``, ``querystring``, ``path`` or ``headers``
takes an additional level of mapping for ``body``, ``querystring``, ``path`` or ``headers``
instead of the former ``location`` attribute on schema fields.

The ``request.validated`` hence reflects this additional level.
Expand Down
10 changes: 5 additions & 5 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TestService(TestCase):
def tearDown(self):
clear_services()

def test_service_instanciation(self):
def test_service_instantiation(self):
service = Service("coconuts", "/migrate")
self.assertEqual(service.name, "coconuts")
self.assertEqual(service.path, "/migrate")
Expand Down Expand Up @@ -74,7 +74,7 @@ def test_get_arguments(self):
self.assertEqual(args[arg], getattr(Service, arg, None))

# calling this method on a configured service should use the values
# passed at instanciation time as default values
# passed at instantiation time as default values
service = Service("coconuts", "/migrate", renderer="html")
args = service.get_arguments({})
self.assertEqual(args['renderer'], 'html')
Expand Down Expand Up @@ -395,8 +395,8 @@ def test_cors_support(self):
cors_origins=('*'), cors_enabled=False)
.cors_enabled)

def test_cors_headers_for_service_instanciation(self):
# When definining services, it's possible to add headers. This tests
def test_cors_headers_for_service_instantiation(self):
# When defining services, it's possible to add headers. This tests
# it is possible to list all the headers supported by a service.
service = Service('coconuts', '/migrate',
cors_headers=('X-Header-Coconut'))
Expand All @@ -413,7 +413,7 @@ def test_cors_headers_for_view_definition(self):
self.assertIn('X-Header-Foobar', service.cors_supported_headers_for())

def test_cors_headers_extension(self):
# definining headers in the service and in the view
# defining headers in the service and in the view
service = Service('coconuts', '/migrate',
cors_headers=('X-Header-Foobar'))
service.add_view('POST', _stub, cors_headers=('X-Header-Barbaz'))
Expand Down

0 comments on commit 06f9de7

Please sign in to comment.