Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's bad practice to derive custom exception classes from BaseException. #276

Merged
merged 1 commit into from
Sep 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion connexion/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"""


class ConnexionException(BaseException):
class ConnexionException(Exception):
pass


Expand Down
2 changes: 1 addition & 1 deletion tests/api/test_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ def test_add_api_with_function_resolver_function_is_wrapped(simple_api_spec_dir)
def test_default_query_param_does_not_match_defined_type(
default_param_error_spec_dir):
with pytest.raises(InvalidSpecification):
build_app_from_fixture(default_param_error_spec_dir, validate_responses=True)
build_app_from_fixture(default_param_error_spec_dir, validate_responses=True, debug=False)
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ def default_param_error_spec_dir():


def build_app_from_fixture(api_spec_folder, **kwargs):
app = App(__name__, 5001, FIXTURES_FOLDER / api_spec_folder, debug=True)
debug = True
if 'debug' in kwargs:
debug = kwargs['debug']
del(kwargs['debug'])
app = App(__name__, 5001, FIXTURES_FOLDER / api_spec_folder, debug=debug)
app.add_api('swagger.yaml', **kwargs)
return app

Expand Down