Fixes 2 python issues within the tests

* Fixes python 3 use (syntax)
* Fixes check on /usr/bin/django-admin.py (regression from #480)