'@method_decorator on a nonexistent method raises an error.'

def test_invalid_method_name_to_decorate(self):

    msg = "The    keyword    argument    `name`    must    be    the    name    of    a    method    of    the    decorated    class:    <class    'Test'>.    Got    'nonexistent_method'    instead"
    with self.assertRaisesMessage(ValueError, msg):
        @method_decorator((lambda : None), name='nonexistent_method')
        class Test:
            @classmethod
            def __module__(cls):
                return 'tests'
