1030905 more api tests

Add api tests for filtering by date.
Also edited code for pep8 compliance for quality.
For posterity's sake I will mention here we agreed that because different tests in this class require different data sets, this should not be a setup method. If that were not the case, then I would agree.