'Tests to make sure tasks are squashed'

@mock.patch.object(QuestionMappingType, 'index')
def test_tasks_squashed(self, index_fun):

    q = QuestionFactory()
    eq_(index_fun.call_count, 0)
    q.save()
    q.save()
    q.save()
    q.save()
    eq_(index_fun.call_count, 0)
    generate_tasks()
    eq_(index_fun.call_count, 1)
