1030905 more api tests

Add api tests for filtering by date.
Also edited code for pep8 compliance for quality.
I don't know offhand if this is intentional or not, but this probably handles the case when the test is executing at midnight and thus `date.today()` returns one "today" and then starts returning another "today".