Skip to content
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
9 changes: 9 additions & 0 deletions tests/exceptions_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import unittest
from ubersmith_client.exceptions import UbersmithException


class ExceptionTestTest(unittest.TestCase):

def test_UbersmithException_has_string_representation(self):
ex = UbersmithException(code=42, message='Wubba Lubba Dub Dub')
self.assertEquals("{0}".format(ex), "Error code 42 - message: Wubba Lubba Dub Dub")
2 changes: 2 additions & 0 deletions ubersmith_client/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


class UbersmithException(Exception):
code = None
message = None
Expand Down