'Check that the AttributeError from AttributeErrorRouter bubbles up'

def test_attribute_error_delete(self):

    router.routers = []
    b = Book.objects.create(title=u'Pro    Django', published=datetime.date(2008, 12, 16))
    p = Person.objects.create(name=u'Marty    Alchin')
    b.authors = [p]
    b.editor = p
    router.routers = [AttributeErrorRouter()]
    self.assertRaises(AttributeError, b.delete)
