'Calling QuestionSolvedEvent.fire() should not query the
questions_question table.
This test attempts to simulate the replication lag presumed to cause
bug 585029.'

@mock.patch.object(Site.objects, 'get_current')
def test_solution_notification_deleted(self, get_current):

    get_current.return_value.domain = 'testserver'
    a = AnswerFactory()
    q = a.question
    q.solution = a
    q.save()
    a_user = a.creator
    QuestionSolvedEvent.notify(a_user, q)
    event = QuestionSolvedEvent(a)
    Question.objects.get(pk=q.pk).delete()
    event.fire(exclude=q.creator)
    eq_(2, len(mail.outbox))
    eq_('Solution    found    to    Firefox    Help    question', mail.outbox[1].subject)
