1030905 more api tests

Add api tests for filtering by date.
Also edited code for pep8 compliance for quality.
Pretty sure we don't need this comment since it's just repeating the docstrings of the relevant tests.