Exemple #1
0
    def test_create_aiml_folder(self):
        temp_folder = self.get_tmp_folder()
        aiml_folder = temp_folder + os.sep + "aiml"
        self.ensure_folder_does_not_exist(aiml_folder)

        AdminTool.create_aiml_folder(temp_folder, False)
        self.assertTrue(os.path.exists(aiml_folder))

        self.ensure_folder_does_not_exist(aiml_folder)
Exemple #2
0
    def test_create_aiml_folder_with_defaults(self):
        temp_folder = self.get_tmp_folder()
        aiml_folder = temp_folder + os.sep + "aiml"
        self.ensure_folder_does_not_exist(aiml_folder)

        aiml_file = temp_folder + os.sep + "aiml" + os.sep + "hello.aiml"
        self.ensure_file_does_not_exist(aiml_file)

        AdminTool.create_aiml_folder(temp_folder, True)
        self.assertTrue(os.path.exists(aiml_folder))
        self.assertTrue(os.path.exists(aiml_file))

        self.ensure_file_does_not_exist(aiml_file)
        self.ensure_folder_does_not_exist(aiml_folder)