Django 1.7: use transaction.atomic
Updated tests for Django 1.7