Skip to content

Commit

Permalink
Fix misused assertTrue in unit tests
Browse files Browse the repository at this point in the history
Refactored unit tests to use assertEqual instead of assertTrue
where needed.

Fixes bug #1226374

Change-Id: I678b2e7fcc522c8776c7fc0a554c1fc229ab781e
  • Loading branch information
glongwave committed Sep 26, 2013
1 parent 5588abd commit baa9490
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keystoneclient/tests/v2_0/test_ec2.py
Expand Up @@ -98,9 +98,9 @@ def test_list(self):
'OS-EC2'], json=resp_body)

creds = self.client.ec2.list(user_id)
self.assertTrue(len(creds), 2)
self.assertEqual(len(creds), 2)
cred = creds[0]
self.assertTrue(isinstance(cred, ec2.EC2))
self.assertIsInstance(cred, ec2.EC2)
self.assertEqual(cred.tenant_id, tenant_id)
self.assertEqual(cred.enabled, True)
self.assertEqual(cred.access, 'access')
Expand Down

0 comments on commit baa9490

Please sign in to comment.