Upgraded method for db reuse copied from NOSE according to changes in django 1.5