1030905 more api tests

Add api tests for filtering by date.
Also edited code for pep8 compliance for quality.
Since there's no data for 2014-06-30, the test is ambiguous as to whether the code it's testing is correct. Probably better to test with a `date_end` of 2014-07-03 since then your expected dates are 2014-07-02 and 2014-07-03 and you have one day on either side that you expect won't show up.