Inherit from the right exceptions
authorKarl O. Pinc <kop@karlpinc.com>
Fri, 23 Apr 2021 21:38:47 +0000 (16:38 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Fri, 23 Apr 2021 21:38:47 +0000 (16:38 -0500)
src/pgwui_common/exceptions.py
tests/test_urls.py

index 65cf567c484619c91fd3d1a99b7f6cf45ff0c0f9..593cd7e06fefcf62ccbddd22b6b885b6baf8ccb9 100644 (file)
@@ -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
index 8b9b064f66a9795e91d5f3efe5f21d029bc834af..6b6ebfa17af3645bac102a182fe69d979b1bd5ba 100644 (file)
@@ -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