Exemplo n.º 1
0
def test_check_config():
    _info = setup_conv()
    # set tool_config
    _info['conv'].tool_config['login_hint'] = 'diana'
    oper = AsyncAuthn(_info['conv'], _info['io'], None)
    check_config(oper, {"login_hint": None})
    ev = oper.conv.events.get(EV_CONDITION)
    assert ev == []
Exemplo n.º 2
0
def test_check_config_missing():
    _info = setup_conv()
    oper = AsyncAuthn(_info['conv'], _info['io'], None)
    check_config(oper, {"login_hint": None})

    ev = oper.conv.events.get(EV_CONDITION)
    assert len(ev) == 1
    assert ev[0].data.status == ERROR
    assert oper.unsupported