コード例 #1
0
def test_action_instantiation_from_names():
    instantiated_actions = action.actions_from_names(
        ["random_name", "utter_test"], None, ["random_name", "utter_test"])
    assert len(instantiated_actions) == 2
    assert isinstance(instantiated_actions[0], RemoteAction)
    assert instantiated_actions[0].name() == "random_name"

    assert isinstance(instantiated_actions[1], UtterAction)
    assert instantiated_actions[1].name() == "utter_test"
コード例 #2
0
ファイル: test_actions.py プロジェクト: rohitjun08/rasa_core
def test_action_instantiation_from_names():
    instantiated_actions = action.actions_from_names(
            ["random_name", "utter_test"], None, ["random_name", "utter_test"])
    assert len(instantiated_actions) == 2
    assert isinstance(instantiated_actions[0], RemoteAction)
    assert instantiated_actions[0].name() == "random_name"

    assert isinstance(instantiated_actions[1], UtterAction)
    assert instantiated_actions[1].name() == "utter_test"