Skip to content

Commit

Permalink
fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Mar 15, 2020
1 parent 3996a6e commit 8d54ad2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/grants/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class GrantCategory(SuperModel):
def all_categories():
all_tech_categories = GrantCategory.tech_categories()
filtered_media_categories = [category for category in GrantCategory.media_categories() if category not in all_tech_categories]
return all_tech_categories + filtered_media_categories + GrantCategory.media_categories()
return all_tech_categories + filtered_media_categories + GrantCategory.health_categories()

@staticmethod
def tech_categories():
Expand Down
8 changes: 6 additions & 2 deletions app/grants/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def test_fetching_grant_categories_from_api(self):
['twitter', 8],
['reddit', 9],
['blog', 10],
['notes', 11]
['notes', 11],
['COVID19 research',12],
['COVID19 response',13]
],
'status': 200
}
Expand All @@ -52,7 +54,9 @@ def test_retrieving_all_categories(self):
('twitter', 8),
('reddit',9),
('blog',10),
('notes',11)
('notes',11),
('COVID19 research',12),
('COVID19 response',13)
]

self.assertEqual(all_categories, expected_response)
Expand Down

0 comments on commit 8d54ad2

Please sign in to comment.