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 <>
Here's a minimal example so my comment is not totally vacuous:

import unittest
from unittest import mock

class Foo:
    def bar(cls, baz):

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


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

Ran 1 test in 0.001s
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: <>
2018-11-26 14:46:50tom.dalton.fanduellinkissue23078 messages
2018-11-26 14:46:50tom.dalton.fanduelcreate