Exemplo n.º 1
0
def test_user_transition():
    df = DialogueFlow(States.B)
    df.add_user_transition(States.B, States.C, "[{hi, hello, hey, [how, you]}]")
    df.add_user_transition(States.B, States.D, "[{bye, goodbye, see you, see ya, later}]")
    assert df.user_transition("oh hey there", df.state()) == States.C
    assert df.user_transition("well see ya later", df.state()) == States.D
Exemplo n.º 2
0
def test_single_user_transition():
    df = DialogueFlow(States.B)
    df.add_user_transition(States.B, States.C, "[{hi, hello, hey, [how, you]}]")
    assert df.user_transition("oh hey there", df.state()) == States.C