Fixed encoding server error + wrote CSV download tests #247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We were getting a server error (https://phabricator.wikimedia.org/T219770) relating to non-ascii partner names in CSV downloads. I poked around trying to fix the encoding for a little while before realising the simplest solution was to just remove the largely unnecessary partner name from the CSV header. If you're downloading a CSV from an individual partner page I can't see that being very useful information to include in the actual file.
While here I also realised we had a grand total of 2 CSV download tests and they were only for the pageviews. As far as I can tell we didn't even have a test for the Dashboard page returning a 200. So I also wrote tests to cover every CSV download view :)