'Ensure the correct warnings are raised when a class that renamed
`old` subclass one that didn\'t.'

def test_renamed_subclass_deprecated(self):

    with warnings.catch_warnings(record=True) as recorded:
        warnings.simplefilter(u'ignore')
        class Deprecated(six.with_metaclass(RenameManagerMethods), ):
            def old(self):
                pass
        class Renamed(Deprecated, ):
            def new(self):
                super(Renamed, self).new()
        warnings.simplefilter(u'always')
        renamed = Renamed()
        renamed.new()
        self.assertEqual(len(recorded), 0)
        renamed.old()
        self.assertEqual(len(recorded), 1)
        msg = str(recorded.pop().message)
        self.assertEqual(msg, u'`Renamed.old`    is    deprecated,    use    `new`    instead.')
