libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quent...@apache.org
Subject [6/7] libcloud git commit: Replace function calls to set litteral
Date Fri, 16 Mar 2018 15:26:08 GMT
Replace function calls to set litteral

Signed-off-by: Quentin Pradet <quentinp@apache.org>


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

Branch: refs/heads/trunk
Commit: b17d6c82b3200f095381298fa6af9cbe27129521
Parents: 52ff932
Author: Rémy Léone <rleone@online.net>
Authored: Fri Mar 16 10:57:50 2018 +0100
Committer: Quentin Pradet <quentinp@apache.org>
Committed: Fri Mar 16 19:23:44 2018 +0400

----------------------------------------------------------------------
 libcloud/test/compute/test_azure_arm.py      | 9 +++------
 libcloud/test/loadbalancer/test_gogrid.py    | 3 +--
 libcloud/test/loadbalancer/test_rackspace.py | 2 +-
 3 files changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b17d6c82/libcloud/test/compute/test_azure_arm.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_azure_arm.py b/libcloud/test/compute/test_azure_arm.py
index bd8cfa0..29ba98e 100644
--- a/libcloud/test/compute/test_azure_arm.py
+++ b/libcloud/test/compute/test_azure_arm.py
@@ -89,11 +89,8 @@ class AzureNodeDriverTests(LibcloudTestCase):
     def test_ex_get_ratecard(self):
         ratecard = self.driver.ex_get_ratecard('0026P')
         self.assertEqual(set(ratecard.keys()),
-                         set(['Currency',
-                              'Locale',
-                              'IsTaxIncluded',
-                              'OfferTerms',
-                              'Meters']))
+                         {'Currency', 'Locale', 'IsTaxIncluded',
+                          'OfferTerms', 'Meters'})
 
     def test_create_node(self):
         location = NodeLocation('any_location', '', '', self.driver)
@@ -391,7 +388,7 @@ class AzureNodeDriverTests(LibcloudTestCase):
         data_disks = node.extra['properties']['storageProfile']['dataDisks']
         luns = [disk['lun'] for disk in data_disks]
         self.assertTrue(len(data_disks), len(volumes))
-        self.assertTrue(set(luns), set([0, 1, 15]))
+        self.assertTrue(set(luns), {0, 1, 15})
 
     def test_detach_volume(self):
         volumes = self.driver.list_volumes()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/b17d6c82/libcloud/test/loadbalancer/test_gogrid.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_gogrid.py b/libcloud/test/loadbalancer/test_gogrid.py
index f01a28a..1e1702d 100644
--- a/libcloud/test/loadbalancer/test_gogrid.py
+++ b/libcloud/test/loadbalancer/test_gogrid.py
@@ -111,8 +111,7 @@ class GoGridTests(unittest.TestCase):
         members1 = self.driver.balancer_list_members(balancer=balancer)
         members2 = balancer.list_members()
 
-        expected_members = set(['10.0.0.78:80', '10.0.0.77:80',
-                                '10.0.0.76:80'])
+        expected_members = {'10.0.0.78:80', '10.0.0.77:80', '10.0.0.76:80'}
 
         self.assertEqual(len(members1), 3)
         self.assertEqual(len(members2), 3)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/b17d6c82/libcloud/test/loadbalancer/test_rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_rackspace.py b/libcloud/test/loadbalancer/test_rackspace.py
index 02c3735..0212254 100644
--- a/libcloud/test/loadbalancer/test_rackspace.py
+++ b/libcloud/test/loadbalancer/test_rackspace.py
@@ -675,7 +675,7 @@ class RackspaceLBTests(unittest.TestCase):
         self.assertEqual(default_error_page, error_page_content)
 
     def test_balancer_list_members(self):
-        expected = set(['10.1.0.10:80', '10.1.0.11:80', '10.1.0.9:8080'])
+        expected = {'10.1.0.10:80', '10.1.0.11:80', '10.1.0.9:8080'}
         balancer = self.driver.get_balancer(balancer_id='8290')
         members = balancer.list_members()
 


Mime
View raw message