def test_decorate_resource_view(self): class MyResource(object): def __init__(self, **kwargs): pass def myview(self): pass meth = "POST" decorated = decorate_view(_UnboundView(MyResource, "myview"), {}, meth) self.assertEqual(decorated.__name__, "{0}__{1}".format(func_name(MyResource.myview), meth))
def test_decorate_resource_view(self): class MyResource(object): def __init__(self, **kwargs): pass def myview(self): pass meth = 'POST' decorated = decorate_view(_UnboundView(MyResource, 'myview'), {}, meth) self.assertEqual(decorated.__name__, "{0}__{1}".format( func_name(MyResource.myview), meth))