Comment 33 for bug 1475722

Revision history for this message
sonu (sonu-bhumca11) wrote : Re: Never use MagicMock

Hi

what exactly is the issue here?

also is there any checks available for this to avoid regression?

It is failing while we use Mock

for e.g

x = mock.MagicMock(tst='abc')
>>> x[0]

>>> x = mock.Mock(tst='abc')

>>> x[0]
Traceback (most recent call last):
  File "", line 1, in
TypeError: 'Mock' object does not support indexing