Skip to content
Merged
Prev Previous commit
Next Next commit
fix: TT-401 implemented faker url
  • Loading branch information
ararcos committed Nov 19, 2021
commit ddf305c935ea124881c9f1952ee32cd8869cd412
18 changes: 3 additions & 15 deletions V2/tests/integration/daos/time_entries_dao.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,11 @@ def _creator(time_entries):


def test_create_time_entry__returns_an_time_entry_dto__when_create_an_time_entry_that_matches_attributes(
create_fake_time_entries,
create_fake_time_entries, time_entry_factory
):
create_fake_time_entries([])

time_entries_json_dao = TimeEntriesJsonDao(Faker().file_path())
time_entry_data = {
"id": None,
"start_date": Faker().date(),
"owner_id": Faker().random_int(),
"description": Faker().sentence(),
"activity_id": Faker().random_int(),
"uri": "http://timetracker.com",
"technologies": ["jira", "git"],
"end_date": Faker().date(),
"deleted": False,
"timezone_offset": "300",
"project_id": Faker().random_int(),
}
result = time_entries_json_dao.create(time_entry_data)
time_entry_data = time_entry_factory()
result = time_entries_json_dao.create(time_entry_data.__dict__)
assert result == TimeEntry(**time_entry_data)
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
[{"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}]
[
{
"id": 1,
"start_date": "12/07/2021",
"owner_id": 2,
"description": "Review system of Time Tracker",
"activity_id": 2,
"uri": "http://time_tracker.com",
"technologies": [
"git",
"jira",
"python"
],
"end_date": "12/07/2021",
"deleted": false,
"timezone_offset": "300",
"project_id": 1
},
{
"id": 2,
"start_date": "12/07/2021",
"owner_id": 2,
"description": "Review system of doors in the ioet office Loja, change the current raspberry pi ",
"activity_id": 2,
"uri": null,
"technologies": [
"git",
"jira",
"python"
],
"end_date": "12/07/2021",
"deleted": false,
"timezone_offset": "300",
"project_id": 1
}
]