We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6203ed2 commit 49c73dbCopy full SHA for 49c73db
tests/exceptions_test.py
@@ -0,0 +1,9 @@
1
+import unittest
2
+from ubersmith_client.exceptions import UbersmithException
3
+
4
5
+class ExceptionTestTest(unittest.TestCase):
6
7
+ def test_UbersmithException_has_string_representation(self):
8
+ ex = UbersmithException(code=42, message='Wubba Lubba Dub Dub')
9
+ self.assertEquals("{0}".format(ex), "Error code 42 - message: Wubba Lubba Dub Dub")
ubersmith_client/exceptions.py
@@ -11,6 +11,8 @@
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
15
16
class UbersmithException(Exception):
17
code = None
18
message = None
0 commit comments