diff options
author | Jamie Lennox <jlennox@redhat.com> | 2013-05-21 14:31:50 +1000 |
---|---|---|
committer | Jamie Lennox <jlennox@redhat.com> | 2013-05-21 15:27:46 +1000 |
commit | fe57d6de5b82a8b2ae07bfb136a7b17183c04cbb (patch) | |
tree | ab4b7a4c68248b6783a5c0e80d7a675102acdb18 /tests/test_v3.py | |
parent | 8d2b8e6457d5ae0ed1136091cb8c143a96abd614 (diff) | |
download | keystone-fe57d6de5b82a8b2ae07bfb136a7b17183c04cbb.tar.gz keystone-fe57d6de5b82a8b2ae07bfb136a7b17183c04cbb.tar.xz keystone-fe57d6de5b82a8b2ae07bfb136a7b17183c04cbb.zip |
Add assertNotEmpty to tests and use it.
Extract the use of assertTrue(len(...)) into a method. The docs for
assertTrue say that it equates to bool(expr) is True and so the format
is correct however it reads inconsistently.
Change-Id: I75acf75f6eaac9b7f92fd452cc60ab0cfd447c7f
Diffstat (limited to 'tests/test_v3.py')
-rw-r--r-- | tests/test_v3.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_v3.py b/tests/test_v3.py index 38e88079..0acfbf81 100644 --- a/tests/test_v3.py +++ b/tests/test_v3.py @@ -338,7 +338,7 @@ class RestfulTestCase(test_content_types.RestfulTestCase): self.assertEqual(len(entities), expected_length) elif ref is not None: # we're at least expecting the ref - self.assertTrue(len(entities)) + self.assertNotEmpty(entities) # collections should have relational links self.assertValidListLinks(resp.body.get('links')) |