libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [4/5] libcloud git commit: Fix test failures under Python 3.5.
Date Sun, 08 Nov 2015 16:49:37 GMT
Fix test failures under Python 3.5.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/787f1c62
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/787f1c62
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/787f1c62

Branch: refs/heads/trunk
Commit: 787f1c623d3b75b7ca5737829eafc54a2aeee255
Parents: ccc7b6d
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Sun Nov 8 17:44:04 2015 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Sun Nov 8 17:44:04 2015 +0100

----------------------------------------------------------------------
 libcloud/test/compute/test_digitalocean_v1.py | 2 +-
 libcloud/test/compute/test_digitalocean_v2.py | 2 +-
 libcloud/test/compute/test_ibm_sce.py         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/787f1c62/libcloud/test/compute/test_digitalocean_v1.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_digitalocean_v1.py b/libcloud/test/compute/test_digitalocean_v1.py
index 668e56e..5719500 100644
--- a/libcloud/test/compute/test_digitalocean_v1.py
+++ b/libcloud/test/compute/test_digitalocean_v1.py
@@ -95,7 +95,7 @@ class DigitalOcean_v1_Tests(LibcloudTestCase):
 
         DigitalOceanMockHttp.type = 'INVALID_IMAGE'
         expected_msg = \
-            r'You specified an invalid image for Droplet creation. \(code: 404\)'
+            r'You specified an invalid image for Droplet creation. \(code: (404|HTTPStatus.NOT_FOUND)\)'
         self.assertRaisesRegexp(Exception, expected_msg,
                                 self.driver.create_node,
                                 name='test', size=size, image=image,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/787f1c62/libcloud/test/compute/test_digitalocean_v2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_digitalocean_v2.py b/libcloud/test/compute/test_digitalocean_v2.py
index 03a6425..e666ce5 100644
--- a/libcloud/test/compute/test_digitalocean_v2.py
+++ b/libcloud/test/compute/test_digitalocean_v2.py
@@ -94,7 +94,7 @@ class DigitalOcean_v2_Tests(LibcloudTestCase):
 
         DigitalOceanMockHttp.type = 'INVALID_IMAGE'
         expected_msg = \
-            r'You specified an invalid image for Droplet creation. \(code: 404\)'
+            r'You specified an invalid image for Droplet creation. \(code: (404|HTTPStatus.NOT_FOUND)\)'
         self.assertRaisesRegexp(Exception, expected_msg,
                                 self.driver.create_node,
                                 name='test', size=size, image=image,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/787f1c62/libcloud/test/compute/test_ibm_sce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ibm_sce.py b/libcloud/test/compute/test_ibm_sce.py
index 55071a4..cc0beff 100644
--- a/libcloud/test/compute/test_ibm_sce.py
+++ b/libcloud/test/compute/test_ibm_sce.py
@@ -44,7 +44,7 @@ class IBMTests(unittest.TestCase, TestCaseMixin):
         except InvalidCredsError:
             e = sys.exc_info()[1]
             self.assertTrue(isinstance(e, InvalidCredsError))
-            self.assertEqual(e.value, '401: Unauthorized')
+            self.assertTrue('Unauthorized' in e.value)
         else:
             self.fail('test should have thrown')
 


Mime
View raw message