Skip to content

Commit

Permalink
update test and test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tawakalt committed Oct 20, 2023
1 parent f667920 commit a35ba8e
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 75 deletions.
7 changes: 7 additions & 0 deletions data/test/test_integration/data/nlu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,10 @@ nlu:
- are you a human?
- am I talking to a bot?
- am I talking to a human?
- intent: block
examples: |
- block my [checking](account_type) account
- i want to block my [savings](account_type) account
- i need to block an account
- i need to block my [credit](account_type) card
26 changes: 26 additions & 0 deletions data/test/test_integration/data/stories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,29 @@ stories:
- action: utter_did_that_help
- intent: deny
- action: utter_goodbye

- story: block savings
steps:
- intent: block
entities:
- account_type: savings
- action: utter_block_account

- story: block checking
steps:
- intent: block
entities:
- account_type: checking
- action: utter_checking

- story: block credit
steps:
- intent: block
entities:
- account_type: credit
- action: utter_credit

- story: block no entities
steps:
- intent: block
- action: utter_nothing
30 changes: 30 additions & 0 deletions data/test/test_integration/domain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ intents:
- mood_great
- mood_unhappy
- bot_challenge
- block

responses:
utter_greet:
Expand All @@ -29,6 +30,35 @@ responses:
utter_iamabot:
- text: "I am a bot, powered by Rasa."

utter_block_account:
- text: "your account has been blocked"

utter_checking:
- text: "checking account"

utter_credit:
- text: "credit account"

utter_nothing:
- text: "no account type was specified"

entities:
- account_type

slots:
account_type:
type: categorical
influence_conversation: true
values:
- savings
- checking
- credit
mappings:
- type: from_entity
entity: account_type
conditions:
- active_loop: null

session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
64 changes: 0 additions & 64 deletions data/test/test_integration/domain_with_null_active_loop.yml

This file was deleted.

13 changes: 2 additions & 11 deletions tests/integration_tests/core/test_cli_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ def test_rasa_validate_null_active_loop_no_errors(

test_data_dir = Path(request.config.rootdir, "data", "test", "test_integration")
test_config_dir = Path(request.config.rootdir, "data", "test_config")
source_file = (test_data_dir).absolute()
domain_file = (test_data_dir / "domain_with_null_active_loop.yml").absolute()
source_file = (test_data_dir / "data").absolute()
domain_file = (test_data_dir / "domain.yml").absolute()
config_file = (test_config_dir / "config_unique_assistant_id.yml").absolute()
result = run(
"data",
Expand All @@ -181,12 +181,3 @@ def test_rasa_validate_null_active_loop_no_errors(
assert "Validating utterances..." in stderr_text
assert "Considering all preceding turns for conflict analysis." in stderr_text
assert "No story structure conflicts found." in stderr_text

output_text = "".join(result.outlines)
assert "Rasa Open Source reports anonymous usage telemetry"
"to help improve the product" in output_text
assert "for all its users." in output_text
assert "If you'd like to opt-out,"
"you can use `rasa telemetry disable`." in output_text
assert "To learn more, check out"
"https://rasa.com/docs/rasa/telemetry/telemetry." in output_text

0 comments on commit a35ba8e

Please sign in to comment.