Example #1
0
def setup_function(function):
    define_options(os.path.join(CONF_DIR, 'default.conf'))
    handler.finish = MagicMock()

    if not LIVE_SERVICE:
        future = Future()

        class C:
            pass

        C.body = json.dumps(INPUT1)
        C.code = 200
        future.set_result(C)

        AsyncHTTPClient.fetch = MagicMock(return_value=future)

    def get_arg(arg, default):
        if default:
            return default
        return None

    handler.request.get_argument = get_arg
def setup_function(function):
    define_options(os.path.join(CONF_DIR, 'default.conf'))
Example #3
0
def setup_module():
    define_options(os.path.join(CONF_DIR, 'default.conf'))
Example #4
0
def setup_function(function):
    define_options(os.path.join(CONF_DIR, 'default.conf'))