diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:06:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:06:57 +0000 |
commit | a3eed2c248067f0319cb72bcc8b5e2c7054ea6dc (patch) | |
tree | fd79d650c7ffee81608955be5f4fd8edd791834e /testenv/exc | |
parent | Initial commit. (diff) | |
download | wget-upstream.tar.xz wget-upstream.zip |
Adding upstream version 1.20.1.upstream/1.20.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testenv/exc')
-rw-r--r-- | testenv/exc/__init__.py | 0 | ||||
-rw-r--r-- | testenv/exc/server_error.py | 19 | ||||
-rw-r--r-- | testenv/exc/test_failed.py | 7 |
3 files changed, 26 insertions, 0 deletions
diff --git a/testenv/exc/__init__.py b/testenv/exc/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/testenv/exc/__init__.py diff --git a/testenv/exc/server_error.py b/testenv/exc/server_error.py new file mode 100644 index 0000000..fe359f5 --- /dev/null +++ b/testenv/exc/server_error.py @@ -0,0 +1,19 @@ + +class ServerError (Exception): + """ A custom exception which is raised by the test servers. Often used to + handle control flow. """ + + def __init__(self, err_message): + self.err_message = err_message + +class NoBodyServerError (Exception): + """ A custom exception which is raised by the test servers. + Used if no body should be sent in response. """ + + def __init__(self, err_message): + self.err_message = err_message + +class AuthError (ServerError): + """ A custom exception raised byt he servers when authentication of the + request fails. """ + pass diff --git a/testenv/exc/test_failed.py b/testenv/exc/test_failed.py new file mode 100644 index 0000000..89f7960 --- /dev/null +++ b/testenv/exc/test_failed.py @@ -0,0 +1,7 @@ + +class TestFailed(Exception): + + """ A Custom Exception raised by the Test Environment. """ + + def __init__(self, error): + self.error = error |