aclark4life / vanity

Get package download statistics from PyPI
GNU General Public License v2.0
66 stars 14 forks source link

Add tests for get_jsonparsed_data method #55

Closed M3rs closed 8 years ago

M3rs commented 8 years ago

Tests: None, empty string, and sorting/results for single, and multiple releases.

Refactored get_jsonparsed_data to separate the reading of url to allow mocking json result. This separation will allow higher level integration tests to run.

For example, call "count_downloads" with json=True, and have a test use the actual get_release_info and get_jsonparsed_data, but mocked get_json_from_url.