From 175a2c36494cdb4c4790e39899322bf44262a380 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Fri, 23 Apr 2021 16:38:47 -0500 Subject: [PATCH] Inherit from the right exceptions --- src/pgwui_common/exceptions.py | 4 ++-- tests/test_urls.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pgwui_common/exceptions.py b/src/pgwui_common/exceptions.py index 65cf567..593cd7e 100644 --- a/src/pgwui_common/exceptions.py +++ b/src/pgwui_common/exceptions.py @@ -27,13 +27,13 @@ from pgwui_core import exceptions as core_ex from . import constants -class Error(core_ex.PGWUIError): +class Error(core_ex.UploadError): '''Base error class for module ''' pass -class Info(core_ex.PGWUIError): +class Info(core_ex.UploadError): '''Informational exceptions ''' pass diff --git a/tests/test_urls.py b/tests/test_urls.py index 8b9b064..6b6ebfa 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -224,7 +224,7 @@ def test_set_menu_url_bad_page( ''' expected_urls = {'home_page': '/', 'pgwui_logout': '/logout'} - mock_url_of_page.side_effect = common_ex.BadPathError + mock_url_of_page.side_effect = common_ex.BadPathError('example error') request = get_current_request new_urls = expected_urls.copy() result = urls.set_menu_url(request, new_urls) @@ -313,7 +313,7 @@ def test_set_urls_bad_path( returned ''' component_errors = ['some error'] - home_error = common_ex.BadPathError() + home_error = common_ex.BadPathError('example bad path error') request = get_current_request() mock_url_of_page.side_effect = home_error -- 2.34.1