def test_simple_class_based_method_view():
    @hug.object.http_methods()
    class EndPoint(object):

        def get(self):
            return 'hi there!'

        def post(self):
            return 'bye'

    assert hug.test.get(api, 'endpoint').data == 'hi there!'
    assert hug.test.post(api, 'endpoint').data == 'bye'
Test creating class based routers using method mappings
dataset/ETHPy150Open timothycrosley/hug/tests/test_route.py/test_simple_class_based_method_view