def smokeTestModule():
    from simplerpc.common.log.printSmoke import printSmoke
    class TestExpose(QueueCommandBase):
        def test(self):
            return 1
        @expose.safe
        def test2(self):
            pass
    te = TestExpose()
    printSmoke(te.exposedMethods(expose))
    printSmoke(te.exposedMethods(expose.safe))
def smokeTestModule():
    SimpleRpcSettings()
    import example_rpc
    from simplerpc.common.path import joinPath

    class Settings(SimpleRpcSettings):
        #determines the project path and all relative modules in this package
        project_package = example_rpc
        #if relative, its relative to the project package path
        js_path = './webclient/static/js'
        #Where the exposed rpc api class is stored
        js_rpc_file = joinPath(example_rpc.__name__, 'ExposedRpcApi.js')

    from simplerpc.common.log.printSmoke import printSmoke
    printSmoke(Settings().getConfigDict())
示例#3
0
def smokeTestModule():
    from simplerpc.common.log.printSmoke import printSmoke
    class ExampleCrud(CrudBase):
        def create(self, arg1, arg2):
            pass
        def delete(self):
            pass
        def read(self):
            pass
    example = ExampleCrud()
    printSmoke(example.create)
    printSmoke(example.exposedMethods(expose.idempotent))
    printSmoke(example.exposedMethods(expose.safe))
    printSmoke(example.exposedMethods(expose))
    try:
        class ExampleCrud(CrudBase):
            update = None
        example = ExampleCrud()
        example.update
        raise Exception()
    except TypeError:
        pass
示例#4
0
def smokeTestModule():
    from simplerpc.common.log.printSmoke import printSmoke
    from simplerpc.expose_api.decorators import expose
    class TestExpose(ExposedBase):
        @expose
        def test(self):
            return 1
        @expose.safe
        def get(self):
            pass
        @expose.idempotent
        def delete(self):
            pass
    te = TestExpose()
    printSmoke(te.exposedMethods(expose))
    printSmoke(te.exposedMethods(expose.idempotent))
    printSmoke(te.exposedMethods(expose.safe))