Closed
Description
What steps will reproduce the problem?
Create a file foo.py containing the following class definitions:
import abc
class Foo(object):
__metaclass__ = abc.ABCMeta
class Bar(Foo):
pass
Now execute the following:
import foo
import mox
mox.Mox().StubOutClassWithMocks(foo, 'Foo')
What is the expected output?
StubOutClassWithMocks() should not produce any errors.
What do you see instead?
Raises "TypeError: Given attr is not a Class. Use StubOutWithMock."
Reason: type(foo.Foo) is <class 'abc.ABCMeta'>, which doesn't fall into any of
the categories in _USE_MOCK_FACTORY.
Original issue reported on code.google.com by openvcd...@gmail.com
on 12 Apr 2012 at 11:53