def test_create_autospec_none(self):

    class Foo(object):
        bar = None
    mock = create_autospec(Foo)
    none = mock.bar
    self.assertNotIsInstance(none, type(None))
    none.foo()
    none.foo.assert_called_once_with()
def test_create_autospec_none(self):

    class Foo(object):
        bar = None
    mock = create_autospec(Foo)
    none = mock.bar
    self.assertNotIsInstance(none, type(None))
    none.foo()
    none.foo.assert_called_once_with()