Adapt tests for Django 1.5.
Merge branch 'master' into issue_23
Add regression tests for issue #23.