You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by pq...@apache.org on 2010/04/24 02:59:33 UTC

svn commit: r937571 - /incubator/libcloud/trunk/test/test_slicehost.py

Author: pquerna
Date: Sat Apr 24 00:59:33 2010
New Revision: 937571

URL: http://svn.apache.org/viewvc?rev=937571&view=rev
Log:
Update Slicehost test cases to look for InvalidCredsException on an invalid user/pass

Modified:
    incubator/libcloud/trunk/test/test_slicehost.py

Modified: incubator/libcloud/trunk/test/test_slicehost.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_slicehost.py?rev=937571&r1=937570&r2=937571&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_slicehost.py (original)
+++ incubator/libcloud/trunk/test/test_slicehost.py Sat Apr 24 00:59:33 2010
@@ -16,7 +16,7 @@ import sys
 import unittest
 
 from libcloud.drivers.slicehost import SlicehostNodeDriver as Slicehost
-from libcloud.types import Provider, NodeState
+from libcloud.types import Provider, NodeState, InvalidCredsException
 from libcloud.base import Node, NodeImage, NodeSize
 
 import httplib
@@ -46,8 +46,8 @@ class SlicehostTest(unittest.TestCase, T
         SlicehostMockHttp.type = 'UNAUTHORIZED'
         try:
             ret = self.driver.list_nodes()
-        except Exception, e:
-            self.assertEqual(e.args[0], 'HTTP Basic: Access denied.')
+        except InvalidCredsException, e:
+            self.assertEqual(e.value, 'HTTP Basic: Access denied.')
         else:
             self.fail('test should have thrown')