generated from Real-Dev-Squad/website-template
-
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
1 parent
c7da5b9
commit e0661f7
Showing
7 changed files
with
103 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from bson import ObjectId | ||
from todo.models.label import LabelModel | ||
|
||
|
||
label_db_data = [ | ||
{ | ||
"_id": ObjectId("67478036eac9d93db7f59c35"), | ||
"name": "Label 1", | ||
"color": "#fa1e4e", | ||
"createdAt": "2024-11-08T10:14:35", | ||
"createdBy": "qMbT6M2GB65W7UHgJS4g", | ||
}, | ||
{ | ||
"_id": ObjectId("67588c1ac2195684a575840c"), | ||
"name": "Label 2", | ||
"color": "#ea1e4e", | ||
"createdAt": "2024-11-08T10:14:35", | ||
"createdBy": "qMbT6M2GB65W7UHgJS4g", | ||
}, | ||
] | ||
|
||
label_models = [LabelModel(**data) for data in label_db_data] |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
from todo.constants.task import TaskPriority | ||
from todo.models.task import TaskModel | ||
from todo.constants.task import TaskStatus | ||
from todo.dto.task_dto import TaskDTO | ||
from bson import ObjectId | ||
|
||
tasks_db_data = [ | ||
{ | ||
"id": ObjectId("672f7c5b775ee9f4471ff1dd"), | ||
"displayId": "#1", | ||
"title": "Task 1", | ||
"description": "Test task 1", | ||
"priority": TaskPriority.HIGH.value, | ||
"status": TaskStatus.TODO.value, | ||
"assignee": "qMbT6M2GB65W7UHgJS4g", | ||
"isAcknowledged": True, | ||
"labels": [ObjectId("67588c1ac2195684a575840c"), ObjectId("67478036eac9d93db7f59c35")], | ||
"createdAt": "2024-11-08T10:14:35", | ||
"updatedAt": "2024-11-08T15:14:35", | ||
"createdBy": "qMbT6M2GB65W7UHgJS4g", | ||
"updatedBy": "qMbT6M2GB65W7UHgJS4g", | ||
}, | ||
{ | ||
"id": ObjectId("674c726ca89aab38040cb964"), | ||
"displayId": "#2", | ||
"title": "Task 2", | ||
"description": "Test task 2", | ||
"priority": TaskPriority.MEDIUM.value, | ||
"status": TaskStatus.IN_PROGRESS.value, | ||
"assignee": "qMbT6M2GB65W7UHgJS4g", | ||
"isAcknowledged": False, | ||
"labels": [ObjectId("67588c1ac2195684a575840c"), ObjectId("67478036eac9d93db7f59c35")], | ||
"createdAt": "2024-11-08T10:14:35", | ||
"updatedAt": "2024-11-08T15:14:35", | ||
"createdBy": "qMbT6M2GB65W7UHgJS4g", | ||
"updatedBy": "qMbT6M2GB65W7UHgJS4g", | ||
}, | ||
] | ||
|
||
tasks_models = [TaskModel(**data) for data in tasks_db_data] | ||
|
||
|
||
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"}, | ||
), | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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