def test_update_page_task(self): a = AnswerFactory() a.page = 4 a.save() a = Answer.objects.get(pk=a.id) assert a.page == 4 update_answer_pages(a.question.id) a = Answer.objects.get(pk=a.id) assert a.page == 1
def test_update_page_task(self): a = answer(save=True) a.page = 4 a.save() a = Answer.objects.get(pk=a.id) assert a.page == 4 update_answer_pages(a.question) a = Answer.objects.get(pk=a.id) assert a.page == 1
def test_update_page_task(self): answer = Answer.objects.get(pk=1) answer.page = 4 answer.save() answer = Answer.objects.get(pk=1) assert answer.page == 4 update_answer_pages(answer.question) a = Answer.objects.get(pk=1) assert a.page == 1