From a418033481c6d19f1b09572cc030a31886046263 Mon Sep 17 00:00:00 2001 From: Pratyush Singh Date: Thu, 12 Oct 2023 12:57:23 -0400 Subject: [PATCH] chore: revert changes (#66) Co-authored-by: Pratyush Singh --- tests/end2end/end2end_test.py | 21 ++++++++++----------- tests/utils/test_workspace_credentials.py | 13 +++++-------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/tests/end2end/end2end_test.py b/tests/end2end/end2end_test.py index 21f8b4f..13cc43b 100644 --- a/tests/end2end/end2end_test.py +++ b/tests/end2end/end2end_test.py @@ -2,7 +2,6 @@ from assistant_skill_analysis.utils import skills_util import json -@unittest.skip("skip") class TestNotebook(unittest.TestCase): @classmethod def setUpClass(cls): @@ -35,16 +34,16 @@ def setUpClass(cls): _ = fi.readline().strip() cls.assistant_id = fi.readline().strip() - # def test_notebook(self): - # test_file = "tests/resources/test_workspaces/customer_care_skill_test.tsv" - # nb, errors = skills_util.run_notebook( - # notebook_path="classic_dialog_skill_analysis.ipynb", - # iam_apikey=self.apikey, - # wksp_id=self.wksp_id, - # test_file=test_file, - # output_path="notebook_output", - # ) - # self.assertEqual(errors, []) + def test_notebook(self): + test_file = "tests/resources/test_workspaces/customer_care_skill_test.tsv" + nb, errors = skills_util.run_notebook( + notebook_path="classic_dialog_skill_analysis.ipynb", + iam_apikey=self.apikey, + wksp_id=self.wksp_id, + test_file=test_file, + output_path="notebook_output", + ) + self.assertEqual(errors, []) def test_action_notebook(self): test_file = "tests/resources/test_workspaces/test_set_action.tsv" diff --git a/tests/utils/test_workspace_credentials.py b/tests/utils/test_workspace_credentials.py index 5fe8d8a..24fd4f4 100644 --- a/tests/utils/test_workspace_credentials.py +++ b/tests/utils/test_workspace_credentials.py @@ -9,7 +9,7 @@ CONFIG_FILE_ACTION = "./wa_config_action.txt" -# @unittest.skip("skip") +@unittest.skip("skip") class TestWorkspaceCredential(unittest.TestCase): @classmethod def setUpClass(cls): @@ -20,8 +20,7 @@ def setUpClass(cls): with open(CONFIG_FILE_ACTION) as fi: _ = fi.readline().strip() cls.assistant_id = fi.readline().strip() - - @unittest.skip("skip") + def test_workspace_credentials(self): conversation = retrieve_conversation( iam_apikey=self.apikey, @@ -48,11 +47,9 @@ def test_action_credentials(self): assistant_id=self.assistant_id, ).get_result() - # self.assertAlmostEqual( - # 1, result["output"]["intents"][0]["confidence"], delta=1e-6 - # ) - - self.assertGreater(len(result), 0) + self.assertAlmostEqual( + 1, result["output"]["intents"][0]["confidence"], delta=1e-6 + ) if __name__ == "__main__":