diff --git a/todo/tests/fixtures/label_model.py b/todo/tests/fixtures/label_model.py new file mode 100644 index 0000000..22c2765 --- /dev/null +++ b/todo/tests/fixtures/label_model.py @@ -0,0 +1,7 @@ +from todo.models.label import LabelModel + + +label_models = [ + LabelModel(name="Label 1", color="#fa1e4e", createdAt="2024-11-08T10:14:35", createdBy="qMbT6M2GB65W7UHgJS4g"), + LabelModel(name="Label 2", color="#ea1e4e", createdAt="2024-11-08T10:14:35", createdBy="qMbT6M2GB65W7UHgJS4g"), +] diff --git a/todo/tests/fixtures/task_dto.py b/todo/tests/fixtures/task_dto.py new file mode 100644 index 0000000..fa5c3a7 --- /dev/null +++ b/todo/tests/fixtures/task_dto.py @@ -0,0 +1,38 @@ +from todo.dto.task_dto import TaskDTO + +task_dtos = [ + TaskDTO( + id="672f7c5b775ee9f4471ff1dd", + displayId="#1", + title="created rest api", + priority=1, + status="TODO", + assignee={"id": "qMbT6M2GB65W7UHgJS4g", "name": "SYSTEM"}, + isAcknowledged=False, + labels=[{"name": "Beginner Friendly", "color": "#fa1e4e"}], + isDeleted=False, + startedAt="2024-11-09T15:14:35.724000", + dueAt="2024-11-09T15:14:35.724000", + createdAt="2024-11-09T15:14:35.724000", + updatedAt="2024-10-18T15:55:14.802000Z", + createdBy={"id": "xQ1CkCncM8Novk252oAj", "name": "SYSTEM"}, + updatedBy={"id": "Kn5N4Z3mdvpkv0HpqUCt", "name": "SYSTEM"}, + ), + TaskDTO( + id="674c726ca89aab38040cb964", + displayId="#1", + title="task 2", + priority=1, + status="TODO", + assignee={"id": "qMbT6M2GB65W7UHgJS4g", "name": "SYSTEM"}, + isAcknowledged=True, + labels=[{"name": "Beginner Friendly", "color": "#fa1e4e"}], + isDeleted=False, + startedAt="2024-11-09T15:14:35.724000", + dueAt="2024-11-09T15:14:35.724000", + createdAt="2024-11-09T15:14:35.724000", + updatedAt="2024-10-18T15:55:14.802000Z", + createdBy={"id": "xQ1CkCncM8Novk252oAj", "name": "SYSTEM"}, + updatedBy={"id": "Kn5N4Z3mdvpkv0HpqUCt", "name": "SYSTEM"}, + ), +] diff --git a/todo/tests/fixtures/task_model.py b/todo/tests/fixtures/task_model.py new file mode 100644 index 0000000..05276e6 --- /dev/null +++ b/todo/tests/fixtures/task_model.py @@ -0,0 +1,38 @@ +from todo.constants.task import TaskPriority +from todo.models.task import TaskModel +from todo.constants.task import TaskStatus +from bson import ObjectId + +tasks_models = [ + TaskModel( + id=ObjectId(), + displayId="#1", + title="Task 1", + description="Test task 1", + priority=TaskPriority.HIGH, + status=TaskStatus.TODO, + assignee="qMbT6M2GB65W7UHgJS4g", + isAcknowledged=True, + labels=[ObjectId(), ObjectId()], + createdAt="2024-11-08T10:14:35", + updatedAt="2024-11-08T15:14:35", + createdBy="qMbT6M2GB65W7UHgJS4g", + updatedBy="qMbT6M2GB65W7UHgJS4g", + ), + TaskModel( + id=ObjectId(), + displayId="#2", + title="Task 2", + description="Test task 2", + priority=TaskPriority.MEDIUM, + status=TaskStatus.IN_PROGRESS, + assignee="qMbT6M2GB65W7UHgJS4g", + isAcknowledged=True, + labels=[ObjectId(), ObjectId()], + startedAt="2024-11-09T09:14:35", + createdAt="2024-11-08T10:14:35", + updatedAt="2024-11-08T15:14:35", + createdBy="qMbT6M2GB65W7UHgJS4g", + updatedBy="qMbT6M2GB65W7UHgJS4g", + ), +]