Skip to content

Commit

Permalink
sed -e -i 's/register_swagger_endpoints/register_api_doc_endpoints/'
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Nephin committed Feb 20, 2015
1 parent 2b092b1 commit 0a44a58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pyramid_swagger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Import this module to add the validation tween to your pyramid app.
"""
import pyramid
from .api import register_swagger_endpoints
from .api import register_api_doc_endpoints


def includeme(config):
config.add_tween(
"pyramid_swagger.tween.validation_tween_factory",
under=pyramid.tweens.EXCVIEW
)
register_swagger_endpoints(config)
register_api_doc_endpoints(config)
2 changes: 1 addition & 1 deletion pyramid_swagger/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .tween import load_settings


def register_swagger_endpoints(config):
def register_api_doc_endpoints(config):
"""Create and register pyramid endpoints for /api-docs*.
"""
Expand Down
6 changes: 3 additions & 3 deletions tests/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pyramid.testing import DummyRequest

from pyramid_swagger.api import build_api_declaration_view
from pyramid_swagger.api import register_swagger_endpoints
from pyramid_swagger.api import register_api_doc_endpoints
from pyramid_swagger.ingest import API_DOCS_FILENAME
from pyramid_swagger.ingest import ApiDeclarationNotFoundError
from pyramid_swagger.ingest import ResourceListingNotFoundError
Expand All @@ -27,7 +27,7 @@ def build_config(schema_dir):

def test_proper_error_on_missing_resource_listing():
with pytest.raises(ResourceListingNotFoundError) as exc:
register_swagger_endpoints(
register_api_doc_endpoints(
build_config('tests/sample_schemas/missing_resource_listing/'),
)
assert(
Expand All @@ -39,7 +39,7 @@ def test_proper_error_on_missing_resource_listing():

def test_proper_error_on_missing_api_declaration():
with pytest.raises(ApiDeclarationNotFoundError) as exc:
register_swagger_endpoints(
register_api_doc_endpoints(
build_config('tests/sample_schemas/missing_api_declaration/'),
)
assert (
Expand Down

0 comments on commit 0a44a58

Please sign in to comment.