From e091aaebaf160c0eab8d5a5fefc34886ece55be8 Mon Sep 17 00:00:00 2001 From: JennyRemolina Date: Fri, 12 Jul 2019 07:02:30 -0400 Subject: [PATCH] minor fix in how to get boards objects --- api/tests/test_tasks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/tests/test_tasks.py b/api/tests/test_tasks.py index d0e2746..0f08e90 100644 --- a/api/tests/test_tasks.py +++ b/api/tests/test_tasks.py @@ -13,14 +13,14 @@ class TaskTestCase(AuthBaseTestCase): url = '/api/v1/tasks' def setUp(self): - super().setUp() # Authenticanting + super().setUp() # Create 4 users(user,jefe,emp1,emp2) and Login jefe self.data_project = { "title": "black mesa", "description": "particle accelerator", "creator": self.jefe, } self.project = Project.objects.create(**self.data_project) - self.boards = Board.objects.all() + self.boards = Board.objects.filter(project=self.project.id) self.board = self.boards[0] print(self.boards) print(self.board) @@ -28,7 +28,7 @@ def setUp(self): "title": "task 1", "description": "first task", "priority": 1, - "due_date": "2019-11-11", + "due_date": "2019-07-27", "board": self.board, } self.task = Task.objects.create(**self.data) @@ -39,7 +39,6 @@ def test_read_task_get(self): """ Test to verify GET task valid (Model and Serializer) """ - print('before get') url = self.url + '?board={id}'.format(id=self.board.id) response = self.client.get(url) print(response.status_code, response.content)