Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9711ceb
feat: TT-356 Read activities with an azure endpoint
Oct 11, 2021
193261f
refactor: TT-356 Solving code smells from Sonarcloud
Oct 11, 2021
7a8df35
refactor: TT-356 Solving merge conflicts
Oct 13, 2021
11831bd
refactor: TT-356 change directory from files in source to azure_time_…
Oct 13, 2021
6967d42
test: TT-356 Adding azure endpoint api test
Oct 13, 2021
d9ab6a4
feat: TT-358 Use serverless to create Azure endpoint
Oct 14, 2021
c878eb3
refactor: TT-358 Changing time tracker backend app skeleton
Oct 15, 2021
1c28197
refactor: TT-358 Change name to the domain partitioning
Oct 18, 2021
2eb86cd
refactor: TT-358 Change route of activities data json file for azure …
Oct 18, 2021
8a073c3
refactor: TT-358 Change folder structure according to new app skeleton
Oct 19, 2021
f176589
feat: TT-358 Add Makefile to install time tracker backend
Oct 20, 2021
7325a84
refactor: TT-367 merge branch TT-358
JosueOb Oct 21, 2021
936c71e
refactor: TT-358 Change api test to use create temp activities fixture
Oct 22, 2021
b823e87
refactor: TT-367 solving merge conflicts
JosueOb Oct 25, 2021
f13bc69
feat: TT-367 creation of the functionality to change the status of an…
JosueOb Oct 25, 2021
687387f
test: TT-367 unit test for activity service
JosueOb Oct 26, 2021
54ba9cd
test: TT-367 unit test for delete activity use case
JosueOb Oct 26, 2021
2954640
test: TT-367 integration test for activities json dao
JosueOb Oct 26, 2021
d3629b9
test: TT-367 api test for endpoint to delete an activity
JosueOb Oct 26, 2021
e2284c9
refactor: TT-367 solving merge conflicts
JosueOb Oct 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: TT-367 integration test for activities json dao
  • Loading branch information
JosueOb committed Oct 26, 2021
commit 295464036c94b59ebf7b37920e5f8278a79d1d0e
36 changes: 35 additions & 1 deletion V2/tests/integration/daos/activities_json_dao_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test__get_by_id__returns_none__when_no_activity_matches_its_id(

result = activities_json_dao.get_by_id(Faker().uuid4())

assert result == None
assert result is None


def test__get_all__returns_a_list_of_activity_dto_objects__when_one_or_more_activities_are_found(
Expand Down Expand Up @@ -83,3 +83,37 @@ def test_get_all__returns_an_empty_list__when_doesnt_found_any_activities(
result = activities_json_dao.get_all()

assert result == activities


def test_delete__returns_an_activity_with_inactive_status__when_an_activity_matching_its_id_is_found(
create_fake_activities,
):
activities_json_dao = ActivitiesJsonDao(Faker().file_path())
activities = create_fake_activities(
[
{
"name": "test_name",
"description": "test_description",
"tenant_id": "test_tenant_id",
"id": "test_id",
"deleted": "test_deleted",
"status": "test_status",
}
]
)

activity_dto = activities.pop()
result = activities_json_dao.delete(activity_dto.id)

assert result.status == 'inactive'


def test_delete__returns_none__when_no_activity_matching_its_id_is_found(
create_fake_activities,
):
activities_json_dao = ActivitiesJsonDao(Faker().file_path())
create_fake_activities([])

result = activities_json_dao.delete(Faker().uuid4())

assert result is None