Commit d39c994e authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

test_reset: Don't use len on filter objects

Due to lazy evaluation filter returns special object type instead of
final result.

This object does not behave like a list and we cannot call len() on it.
Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent dfaa9872
...@@ -301,6 +301,7 @@ class APITest(APITestBase): ...@@ -301,6 +301,7 @@ class APITest(APITestBase):
prs = filter(lambda r: r['name'] == 'pull-request-new', prs = filter(lambda r: r['name'] == 'pull-request-new',
events['results']) events['results'])
prs = list(prs)
self.assertEqual(len(prs), 1) self.assertEqual(len(prs), 1)
self.assertEqual(prs[0]['patch'], patch.id) self.assertEqual(prs[0]['patch'], patch.id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment