コード例 #1
0
 def it(self):
     it = Mock(name='it', autospec=collections.Iterator)
     it.__aiter__ = Mock(name='it.__aiter__')
     it.__await__ = Mock(name='it.__await__')
     return it
コード例 #2
0
 def it(self):
     it = Mock(name="it", autospec=collections.abc.Iterator)
     it.__aiter__ = Mock(name="it.__aiter__")
     it.__await__ = Mock(name="it.__await__")
     return it