Add flake8 and flake8-import-order to tests

This could be replaced by:
```python
return objects.first()
```
([Docs](https://docs.djangoproject.com/en/dev/ref/models/querysets/#first))