Fixed some flake8 errors.

Originally I added migrations to flake8 exclude because of long lines
in migration files, but there are other directories named migrations we
do want to check. We are not warning on line lengths yet anyway.
Made a GIS test work on Oracle.

Thanks Josh Smeaton and Claude Paroz for advice.