stochastic-technologies/django-loginas — pull request #2 by treyhunner (2013-03-20 00:47:19+00:00)
Title: Add tests for user_login view

A bug in this view could be really nasty security-wise so testing it is important. You were missing tests so I added some.

Just three here:
1. Accessing view as superuser re-authenticates as the given user
2. Accessing view as non-superuser staff member doesn't re-authenticate
3. Accessing view as anonymous user doesn't re-authenticate

To run tests:

./runtests.py

I can add a `.travis.yml` file if you want the tests to be on Travis CI (https://travis-ci.org/).