(
rasa_app: SanicASGITestClient, end_to_end_story_path: Text
)
| 663 | |
| 664 | |
| 665 | async def test_evaluate_stories_end_to_end( |
| 666 | rasa_app: SanicASGITestClient, end_to_end_story_path: Text |
| 667 | ): |
| 668 | stories = rasa.shared.utils.io.read_file(end_to_end_story_path) |
| 669 | |
| 670 | _, response = await rasa_app.post( |
| 671 | "/model/test/stories?e2e=true", |
| 672 | data=stories, |
| 673 | headers={"Content-type": rasa.server.YAML_CONTENT_TYPE}, |
| 674 | ) |
| 675 | |
| 676 | assert response.status == HTTPStatus.OK |
| 677 | js = response.json |
| 678 | assert set(js.keys()) == { |
| 679 | "report", |
| 680 | "precision", |
| 681 | "f1", |
| 682 | "accuracy", |
| 683 | "actions", |
| 684 | "in_training_data_fraction", |
| 685 | "is_end_to_end_evaluation", |
| 686 | } |
| 687 | assert js["is_end_to_end_evaluation"] |
| 688 | assert js["actions"] != [] |
| 689 | assert set(js["actions"][0].keys()) == { |
| 690 | "action", |
| 691 | "predicted", |
| 692 | "confidence", |
| 693 | "policy", |
| 694 | } |
| 695 | |
| 696 | |
| 697 | async def test_add_message(rasa_app: SanicASGITestClient): |
nothing calls this directly
no test coverage detected
searching dependent graphs…