Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcua committed Oct 15, 2017
1 parent 3ed8ad2 commit 037065f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions orchestra/tests/test_dashboard.py
Expand Up @@ -130,11 +130,12 @@ def test_entry_level_task_assignment(self):
def _check_client_dashboard_state(self, client, non_empty_status):
response = client.get('/orchestra/api/interface/dashboard_tasks/')
returned = load_encoded_json(response.content)
for status, val in returned['tasks'].items():
if status == non_empty_status:
self.assertTrue(len(val) > 0)
else:
self.assertTrue(len(val) == 0)
non_empty_tasks = [task for task in returned['tasks']
if task['state'] == non_empty_status]
empty_tasks = [task for task in returned['tasks']
if task['state'] != non_empty_status]
self.assertGreater(len(non_empty_tasks), 0)
self.assertEqual(len(empty_tasks), 0)

def test_reviewer_task_assignment(self):
# there is a review task for user 1
Expand Down

0 comments on commit 037065f

Please sign in to comment.