From: Alfredo Deza Date: Wed, 20 Nov 2013 17:36:02 +0000 (-0500) Subject: a test for the new remote error class X-Git-Tag: 0.0.12~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ccc9de6c19bac0bf28e86de58a58bb376c9c241;p=remoto.git a test for the new remote error class --- diff --git a/remoto/tests/test_util.py b/remoto/tests/test_util.py index 1640695..e4fb11b 100644 --- a/remoto/tests/test_util.py +++ b/remoto/tests/test_util.py @@ -14,3 +14,15 @@ class TestAdminCommand(object): def test_command_that_is_not_a_list(self): result = util.admin_command(True, 'ls') assert result == ['sudo', 'ls'] + + +class TestRemoteError(object): + + def test_exception_name(self): + traceback = ('\n').join([ + 'Traceback (most recent call last):', + ' File "", line 1, in ', + "NameError: name 'foo' is not defined" + ]) + error = util.RemoteError(traceback) + error.exception_name == 'NameError'