1030905 more api tests

Add api tests for filtering by date.
Also edited code for pep8 compliance for quality.
The results should already be sorted by created, so you don't need this.