1030905 more api tests

Add api tests for filtering by date.
Also edited code for pep8 compliance for quality.
The API should sort by created by default. We should rely on that. If it's not doing that, that's a bug.