Example #1
0
 def test_validate_only_config(self, resource_validate_only_config):
     requirements = DataUtility.validate_and_get_requirements(
         pytest.bot_data_home_dir, True)
     assert {'rules', 'actions', 'domain', 'stories', 'nlu'} == requirements
Example #2
0
 def test_validate_only_stories_and_nlu(
         self, resource_validate_only_stories_and_nlu):
     requirements = DataUtility.validate_and_get_requirements(
         pytest.bot_data_home_dir, True)
     assert {'actions', 'config', 'domain'} == requirements
Example #3
0
 def test_validate_path_not_found(self):
     with pytest.raises(AppException):
         DataUtility.validate_and_get_requirements('/tests/path_not_found')
Example #4
0
 def test_validate_no_files_delete_dir(
         self, resource_validate_no_training_files_delete_dir):
     with pytest.raises(AppException):
         DataUtility.validate_and_get_requirements(pytest.bot_data_home_dir,
                                                   True)
     assert not os.path.exists(pytest.bot_data_home_dir)
Example #5
0
 def test_validate_files(self, resource_validate_files):
     requirements = DataUtility.validate_and_get_requirements(
         pytest.bot_data_home_dir)
     assert not requirements