This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tom.dalton.fanduel
Recipients Claudiu.Popa, berker.peksag, deanliao, epu, fov, galuszkak, germanop, kevinbenton, kormat, lukasz.langa, michael.foord, tom.dalton.fanduel
Date 2018-11-26.14:46:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543243610.43.0.788709270274.issue23078@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a minimal example so my comment is not totally vacuous:

```
import unittest
from unittest import mock

class Foo:
    @classmethod
    def bar(cls, baz):
        pass

class TestFoo(unittest.TestCase):
    def test_bar(self):
        with unittest.mock.patch.object(Foo, "bar", autospec=True):
            Foo.bar()
```

->

```
~/› python -m unittest example.py 
E
======================================================================
ERROR: test_bar (example.TestFoo)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "example.py", line 14, in test_bar
    Foo.bar()
TypeError: 'NonCallableMagicMock' object is not callable

----------------------------------------------------------------------
Ran 1 test in 0.001s
```
History
Date User Action Args
2018-11-26 14:46:50tom.dalton.fanduelsetrecipients: + tom.dalton.fanduel, kormat, michael.foord, Claudiu.Popa, lukasz.langa, berker.peksag, epu, galuszkak, fov, kevinbenton, germanop, deanliao
2018-11-26 14:46:50tom.dalton.fanduelsetmessageid: <1543243610.43.0.788709270274.issue23078@psf.upfronthosting.co.za>
2018-11-26 14:46:50tom.dalton.fanduellinkissue23078 messages
2018-11-26 14:46:50tom.dalton.fanduelcreate