1030905 more api tests

Add api tests for filtering by date.
Also edited code for pep8 compliance for quality.
`_test` should call, or include `create_test_data`, since all instances of calling `_test` are proceeded by calls to `create_test_data`.