This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,40 @@ | ||
def create_decision_on_curation_choice(): | ||
pass | ||
from workflows.dags.author.author_create.shared_tasks import ( | ||
create_decision_on_curation_choice, | ||
) | ||
|
||
|
||
def test_create_decision_on_curation_choice(): | ||
create_decision_on_curation_choice() | ||
|
||
|
||
# class TestMyTask(unittest.TestCase): | ||
# @patch("my_dag_module.some_dependency") | ||
# def test_my_task(self, mock_dependency): | ||
# # Arrange: Set up any necessary state or mock returns | ||
# mock_dependency.return_value = "expected_value" | ||
|
||
# # Act: Execute the task logic directly | ||
# result = my_task_function() | ||
|
||
# # Assert: Verify the results are as expected | ||
# self.assertEqual(result, "expected_output") | ||
|
||
|
||
# class TestMyDag(unittest.TestCase): | ||
# def setUp(self): | ||
# self.dagbag = DagBag() | ||
# self.dag = self.dagbag.get_dag(dag_id="my_dag_id") | ||
# self.task = self.dag.get_task("my_task_id") | ||
|
||
# def test_task_execution(self): | ||
# # You can simulate running the task | ||
# from airflow.models import TaskInstance | ||
# from airflow.utils.dates import days_ago | ||
|
||
# ti = TaskInstance(task=self.task, execution_date=days_ago(1)) | ||
|
||
# # You can optionally mock dependencies here | ||
|
||
# # Execute the task and assert the outcome | ||
# ti.run(ignore_ti_state=True) # Ignore previous task instance state | ||
# self.assertEqual(ti.state, State.SUCCESS) |