Message247731
Old functionality:
(temp)rsyring@loftex:~/projects/hllapi-src$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mock
>>> mock.__version__
'1.0.0'
>>> m = mock.Mock()
>>> m.assert_screen_status.call_count
0
New functionality:
(temp)rsyring@loftex:~/projects/hllapi-src$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mock
>>> mock.__version__
'1.1.0'
>>> m = mock.Mock()
>>> m.assert_screen_status.call_count
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rsyring/.virtualenvs/temp/local/lib/python2.7/site-packages/mock/mock.py", line 714, in __getattr__
raise AttributeError(name)
AttributeError: assert_screen_status
In my case, the objects I was patching had a legit method like assert_screen_status(). But, after upgrading Mock, the use of those methods started throwing AttributeError's even though it was very obvious that a) the methods existed on the real objects and b) Mock is supposed to let me call anything on I want. As I said previously, this was a VERY confusing situation to figure out. |
|
Date |
User |
Action |
Args |
2015-07-31 03:35:06 | Randy Syring | set | recipients:
+ Randy Syring, rbcollins, Dima.Tisnek |
2015-07-31 03:35:06 | Randy Syring | set | messageid: <1438313706.93.0.537190622098.issue24758@psf.upfronthosting.co.za> |
2015-07-31 03:35:06 | Randy Syring | link | issue24758 messages |
2015-07-31 03:35:06 | Randy Syring | create | |
|