def test():

    # This worker test requires a local server running
    import zerorpc
    workbench = zerorpc.Client(timeout=300, heartbeat=60)
    workbench.connect("tcp://127.0.0.1:4242")

    # Generate input for the worker
    input_data = workbench.get_info('meta')

    # Execute the worker (unit test)
    worker = HelpBase()
    output = worker.execute(input_data)
    print '\n<<< Unit Test >>>'
    print output

    # Execute the worker (server test)
    output = workbench.work_request('help_base', 'meta')
    print '\n<<< Server Test >>>'
    print output['help_base']
help.py: Unit test
dataset/ETHPy150Open SuperCowPowers/workbench/workbench/workers/help_base.py/test