Updated deprecated manage.py code, added authorization tests to tox.
Use list comprehensions where reasonable, which is slightly faster.