From 56bd648dd05bee2feff54c52a73478492058647b Mon Sep 17 00:00:00 2001 From: Anca Lita <27920906+ancalita@users.noreply.github.com> Date: Mon, 25 Sep 2023 17:14:14 +0100 Subject: [PATCH] replace user warning with logging, fix cli test --- rasa/validator.py | 4 ++-- tests/cli/test_rasa_data.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rasa/validator.py b/rasa/validator.py index 2d1ed68c3f53..25f92345b98a 100644 --- a/rasa/validator.py +++ b/rasa/validator.py @@ -604,8 +604,8 @@ def verify_predicates(self) -> bool: def verify_flows_structure(self) -> bool: """Checks if the flows structure is valid.""" if self.flows.is_empty(): - rasa.shared.utils.io.raise_warning( - "No flows were found in the data files." + logger.warning( + "No flows were found in the data files. " "Will not proceed with flow validation.", ) return True diff --git a/tests/cli/test_rasa_data.py b/tests/cli/test_rasa_data.py index e8c2f869b9ca..95b109852049 100644 --- a/tests/cli/test_rasa_data.py +++ b/tests/cli/test_rasa_data.py @@ -139,7 +139,7 @@ def test_data_validate_help(run: Callable[..., RunResult]): [--max-history MAX_HISTORY] [-c CONFIG] [--fail-on-warnings] [-d DOMAIN] [--data DATA [DATA ...]] - {{stories}} ...""" + {{stories,flows}} ...""" lines = help_text.split("\n") # expected help text lines should appear somewhere in the output