fix django 1.6 assertQuerySetEqual usage and replace deprecated assertions for py3k