Return-Path: X-Original-To: apmail-libcloud-notifications-archive@www.apache.org Delivered-To: apmail-libcloud-notifications-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1DD3B10B79 for ; Tue, 17 Feb 2015 14:57:01 +0000 (UTC) Received: (qmail 42910 invoked by uid 500); 17 Feb 2015 14:56:48 -0000 Delivered-To: apmail-libcloud-notifications-archive@libcloud.apache.org Received: (qmail 42884 invoked by uid 500); 17 Feb 2015 14:56:48 -0000 Mailing-List: contact notifications-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list notifications@libcloud.apache.org Received: (qmail 42875 invoked by uid 500); 17 Feb 2015 14:56:48 -0000 Delivered-To: apmail-libcloud-commits@libcloud.apache.org Received: (qmail 42872 invoked by uid 99); 17 Feb 2015 14:56:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Feb 2015 14:56:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3672BE0379; Tue, 17 Feb 2015 14:56:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: erjohnso@apache.org To: commits@libcloud.apache.org Message-Id: <156d0a6ea5b44f22bfad7570fbe2d292@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: libcloud git commit: [google compute] s/assertTrue/assertEqual/ as needed Date: Tue, 17 Feb 2015 14:56:48 +0000 (UTC) Repository: libcloud Updated Branches: refs/heads/trunk 0d0c4c44e -> e41001ecf [google compute] s/assertTrue/assertEqual/ as needed Closes #453 Signed-off-by: Eric Johnson Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e41001ec Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e41001ec Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e41001ec Branch: refs/heads/trunk Commit: e41001ecfcf046481054268a01cfe67b296ef8e7 Parents: 0d0c4c4 Author: Misha Brukman Authored: Wed Feb 11 21:43:50 2015 -0500 Committer: Eric Johnson Committed: Tue Feb 17 14:56:20 2015 +0000 ---------------------------------------------------------------------- libcloud/test/compute/test_gce.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/e41001ec/libcloud/test/compute/test_gce.py ---------------------------------------------------------------------- diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py index 6a6254e..6759656 100644 --- a/libcloud/test/compute/test_gce.py +++ b/libcloud/test/compute/test_gce.py @@ -268,7 +268,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin): def test_ex_get_license(self): license = self.driver.ex_get_license('suse-cloud', 'sles-12') - self.assertTrue(license.name, 'sles-12') + self.assertEqual(license.name, 'sles-12') self.assertTrue(license.charges_use_fee) def test_list_disktypes(self): @@ -478,9 +478,9 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin): self.assertTrue(node_data['disks'][0]['boot']) self.assertIsInstance(node_data['serviceAccounts'], list) self.assertIsInstance(node_data['serviceAccounts'][0], dict) - self.assertTrue(node_data['serviceAccounts'][0]['email'], 'default') + self.assertEqual(node_data['serviceAccounts'][0]['email'], 'default') self.assertIsInstance(node_data['serviceAccounts'][0]['scopes'], list) - self.assertTrue(len(node_data['serviceAccounts'][0]['scopes']), 1) + self.assertEqual(len(node_data['serviceAccounts'][0]['scopes']), 1) def test_create_node_disk_opts(self): node_name = 'node-name' @@ -545,9 +545,9 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin): ex_service_accounts=ex_sa) self.assertIsInstance(node_data['serviceAccounts'], list) self.assertIsInstance(node_data['serviceAccounts'][0], dict) - self.assertTrue(node_data['serviceAccounts'][0]['email'], 'default') + self.assertEqual(node_data['serviceAccounts'][0]['email'], 'default') self.assertIsInstance(node_data['serviceAccounts'][0]['scopes'], list) - self.assertTrue(len(node_data['serviceAccounts'][0]['scopes']), 3) + self.assertEqual(len(node_data['serviceAccounts'][0]['scopes']), 3) self.assertTrue('https://www.googleapis.com/auth/devstorage.read_only' in node_data['serviceAccounts'][0]['scopes']) self.assertTrue('https://www.googleapis.com/auth/compute.readonly' @@ -600,8 +600,8 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin): vals = [x['value'] for x in out_md['items']] keys.sort() vals.sort() - self.assertTrue(keys, ['k0', 'k1', 'k2']) - self.assertTrue(vals, ['v0', 'v1', 'v2']) + self.assertEqual(keys, ['k0', 'k1', 'k2']) + self.assertEqual(vals, ['v0', 'v1', 'v2']) in_md = {'items': [{'key': 'k0', 'value': 'v0'}, {'key': 'k1', 'value': 'v1'}]} @@ -852,8 +852,8 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin): def test_ex_destroy_address_global(self): address = self.driver.ex_get_address('lcaddressglobal', 'global') - self.assertTrue(address.name, 'lcaddressglobal') - self.assertTrue(address.region, 'global') + self.assertEqual(address.name, 'lcaddressglobal') + self.assertEqual(address.region, 'global') destroyed = address.destroy() self.assertTrue(destroyed) @@ -892,9 +892,9 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin): obsolete=obs_ts, deleted=del_ts) self.assertTrue(deprecated) - self.assertTrue(image.extra['deprecated']['deprecated'], dep_ts) - self.assertTrue(image.extra['deprecated']['obsolete'], obs_ts) - self.assertTrue(image.extra['deprecated']['deleted'], del_ts) + self.assertEqual(image.extra['deprecated']['deprecated'], dep_ts) + self.assertEqual(image.extra['deprecated']['obsolete'], obs_ts) + self.assertEqual(image.extra['deprecated']['deleted'], del_ts) def test_ex_destroy_firewall(self): firewall = self.driver.ex_get_firewall('lcfirewall') @@ -1043,7 +1043,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin): def test_ex_get_image_license(self): image = self.driver.ex_get_image('sles-12-v20141023') self.assertTrue('licenses' in image.extra) - self.assertTrue(image.extra['licenses'][0].name, 'sles-12') + self.assertEqual(image.extra['licenses'][0].name, 'sles-12') self.assertTrue(image.extra['licenses'][0].charges_use_fee) def test_ex_get_image(self): @@ -1109,7 +1109,7 @@ class GCENodeDriverTest(LibcloudTestCase, TestCaseMixin): self.assertTrue('items' in project.extra['commonInstanceMetadata']) self.assertTrue('usageExportLocation' in project.extra) self.assertTrue('bucketName' in project.extra['usageExportLocation']) - self.assertTrue(project.extra['usageExportLocation']['bucketName'], 'gs://graphite-usage-reports') + self.assertEqual(project.extra['usageExportLocation']['bucketName'], 'gs://graphite-usage-reports') def test_ex_add_access_config(self): self.assertRaises(ValueError, self.driver.ex_add_access_config,