Skip to content

Commit ddf305c

Browse files
committed
fix: TT-401 implemented faker url
1 parent 39d2b24 commit ddf305c

File tree

2 files changed

+39
-16
lines changed

2 files changed

+39
-16
lines changed

V2/tests/integration/daos/time_entries_dao.test.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,11 @@ def _creator(time_entries):
1919

2020

2121
def test_create_time_entry__returns_an_time_entry_dto__when_create_an_time_entry_that_matches_attributes(
22-
create_fake_time_entries,
22+
create_fake_time_entries, time_entry_factory
2323
):
2424
create_fake_time_entries([])
2525

2626
time_entries_json_dao = TimeEntriesJsonDao(Faker().file_path())
27-
time_entry_data = {
28-
"id": None,
29-
"start_date": Faker().date(),
30-
"owner_id": Faker().random_int(),
31-
"description": Faker().sentence(),
32-
"activity_id": Faker().random_int(),
33-
"uri": "http://timetracker.com",
34-
"technologies": ["jira", "git"],
35-
"end_date": Faker().date(),
36-
"deleted": False,
37-
"timezone_offset": "300",
38-
"project_id": Faker().random_int(),
39-
}
40-
result = time_entries_json_dao.create(time_entry_data)
27+
time_entry_data = time_entry_factory()
28+
result = time_entries_json_dao.create(time_entry_data.__dict__)
4129
assert result == TimeEntry(**time_entry_data)
Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
1-
[{"id": null, "start_date": "12/07/2021", "owner_id": 2, "tenant_id": "asdasdsa", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": "asdasdsaadssa", "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": 2, "tenant_id": "asdasdsa", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": "asdasdsaadssa", "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": 2, "tenant_id": "asdasdsa", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": "asdasdsaadssa", "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": 2, "tenant_id": "asdasdsa", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": "asdasdsaadssa", "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": 2, "tenant_id": "asdasdsa", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": "asdasdsaadssa", "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": 2, "tenant_id": "asdasdsa", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": "asdasdsaadssa", "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": 2, "tenant_id": "asdasdsa", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": "asdasdsaadssa", "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": 2, "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": "asdasdsaadssa", "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": 2, "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": false, "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": "2", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": false, "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": "2", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": false, "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": "2", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": false, "timezone_offset": "asdasdsa", "project_id": 1}, {"id": null, "start_date": "12/07/2021", "owner_id": "2", "description": "No se que poner jajaj ", "activity_id": 2, "uri": "http://hola.que.hace.com", "technologies": ["git", "jira", "python"], "end_date": "12/07/2021", "deleted": false, "timezone_offset": "asdasdsa", "project_id": 1}]
1+
[
2+
{
3+
"id": 1,
4+
"start_date": "12/07/2021",
5+
"owner_id": 2,
6+
"description": "Review system of Time Tracker",
7+
"activity_id": 2,
8+
"uri": "http://time_tracker.com",
9+
"technologies": [
10+
"git",
11+
"jira",
12+
"python"
13+
],
14+
"end_date": "12/07/2021",
15+
"deleted": false,
16+
"timezone_offset": "300",
17+
"project_id": 1
18+
},
19+
{
20+
"id": 2,
21+
"start_date": "12/07/2021",
22+
"owner_id": 2,
23+
"description": "Review system of doors in the ioet office Loja, change the current raspberry pi ",
24+
"activity_id": 2,
25+
"uri": null,
26+
"technologies": [
27+
"git",
28+
"jira",
29+
"python"
30+
],
31+
"end_date": "12/07/2021",
32+
"deleted": false,
33+
"timezone_offset": "300",
34+
"project_id": 1
35+
}
36+
]

0 commit comments

Comments
 (0)