A method returns iterator object. I want to check the number of data to test.
I think it is a simple question, but I coundn't resolve it.
records = a_function()
self.assertEqual(1, len(records)) # TypeError: object of type 'listiterator' has no len()
Python2.7