Skip to content

Commit

Permalink
fix(test): solve assertion in TestGetTasks
Browse files Browse the repository at this point in the history
  • Loading branch information
acostapazo committed May 25, 2023
1 parent ffc89ba commit 0550428
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/modules/task/retrieve_all/acceptance/test_get_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ def setup_method(self):
def should_return_200(self, client_app):
response = client_app.get("/tasks")
assert_http(response, 200)
assert response.json()["result"] == [self.task.dict()]

filtered_tasks = [
task for task in response.json()["result"] if task.pop("created_at")
]
expected_tasks = [task for task in [self.task.dict()] if task.pop("created_at")]
assert filtered_tasks == expected_tasks

0 comments on commit 0550428

Please sign in to comment.