-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43fc217
commit 2311a83
Showing
2 changed files
with
50 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
''' | ||
Authors: Elijah Sawyers, Benjamin Sanders | ||
Emails: elijahsawyers@gmail.com, ben.sanders97@gmail.com | ||
Date: 10/23/2019 | ||
Overview: Mocks the handle_exception function. | ||
''' | ||
|
||
|
||
class MockHandleException: | ||
''' | ||
Mocks the handle_exception function. | ||
''' | ||
|
||
def __init__(self): | ||
''' | ||
Initializes a mock handle_exception with was_called set | ||
to False and parameter set to None. | ||
''' | ||
|
||
self.was_called = False | ||
self.parameter = None | ||
|
||
def handle_exception(self, error): | ||
''' | ||
Sets was_called to True, indicating that the function was | ||
called, and parameter is set to the error string passed into | ||
the function. | ||
''' | ||
|
||
self.was_called = True | ||
self.parameter = error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters