Exemplo n.º 1
0
    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))
Exemplo n.º 2
0
    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))