def test_attributes(self):

    class Sub(SomeClass):
        attr = SomeClass()
    sub_mock = create_autospec(Sub)
    for mock in (sub_mock, sub_mock.attr):
        self._check_someclass_mock(mock)
def test_attributes(self):

    class Sub(SomeClass):
        attr = SomeClass()
    sub_mock = create_autospec(Sub)
    for mock in (sub_mock, sub_mock.attr):
        self._check_someclass_mock(mock)