Skip to content

Commit d42b85c

Browse files
author
Juan Gabriel Guzman
committed
feat: #125 Adding technologies field to the project resourcet
1 parent ca8476d commit d42b85c

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

tests/time_tracker_api/projects/projects_namespace_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"name": fake.company(),
1313
"description": fake.paragraph(),
1414
'customer_id': fake.uuid4(),
15-
'project_type_id': fake.uuid4()
15+
'project_type_id': fake.uuid4(),
16+
'technologies': ["python", "faker", "openapi"]
17+
1618
}
1719

1820
fake_project = ({
@@ -27,7 +29,6 @@ def test_create_project_should_succeed_with_valid_request(client: FlaskClient,
2729
repository_create_mock = mocker.patch.object(project_dao.repository,
2830
'create',
2931
return_value=fake_project)
30-
3132
response = client.post("/projects",
3233
headers=valid_header,
3334
json=valid_project_data,

time_tracker_api/projects/projects_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class ProjectCosmosDBModel(CosmosDBModel):
3030
customer_id: str
3131
deleted: str
3232
tenant_id: str
33+
technologies: list
3334

3435
def __init__(self, data):
3536
super(ProjectCosmosDBModel, self).__init__(data) # pragma: no cover

time_tracker_api/projects/projects_namespace.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939
description='Id of the project type it belongs. This allows grouping the projects.',
4040
example=faker.uuid4(),
4141
),
42+
'technologies': fields.List(
43+
fields.String,
44+
title='List of technologies this project involves',
45+
required=False,
46+
description='List of technologies this project involves',
47+
example="['python', 'restplus', 'openapi']",
48+
)
4249
})
4350

4451
project_response_fields = {}

0 commit comments

Comments
 (0)