Skip to content

Commit

Permalink
minor fix in how to get boards objects
Browse files Browse the repository at this point in the history
  • Loading branch information
JennyRemolina committed Jul 12, 2019
1 parent 97a9ebc commit e091aae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions api/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ 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)
self.data = {
"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)
Expand All @@ -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)
Expand Down

0 comments on commit e091aae

Please sign in to comment.