Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

Commit

Permalink
Enhancing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anaschwendler committed Jan 5, 2018
1 parent 991a562 commit c15c84a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rosie.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
python rosie.py test [chamber_of_deputies | federal_senate]
Options:
--years runs rosie wuth years filter
--path runs rosie with specific directory
--years runs Rosie fetching data and finding suspicions for a specific set of years
--path directory in which Rosie saves fetched data and the suspicions CSV [default: /tmp/serenata-data]
"""

Expand Down
6 changes: 3 additions & 3 deletions rosie/chamber_of_deputies/tests/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def test_quantity_of_downloaded_datasets_all_years_fetch(self):
years = AVAILABLE_YEARS
chamber_of_deputies = Dataset(self.temp_path, years)
datasets = chamber_of_deputies.fetch()
self.assertEqual(10, len(datasets))
self.assertEqual(len(AVAILABLE_YEARS) + 1, len(datasets)) # data from all years + suspicions file

def test_filter_years_fetch(self):
years = [2017,2016]
years = [2017, 2016]
chamber_of_deputies = Dataset(self.temp_path, years)
datasets = chamber_of_deputies.fetch()
self.assertEqual(3, len(datasets))
self.assertEqual(3, len(datasets)) # data from 2 years + suspicions file

@patch('rosie.chamber_of_deputies.adapter.Dataset')
@patch('rosie.chamber_of_deputies.adapter.fetch')
Expand Down

0 comments on commit c15c84a

Please sign in to comment.