The unit test fails with the following exception:
def test_question_form(self):
question = Question(question_text='Dummy question', pub_date=timezone.now(
) + datetime.timedelta(days=1), allow_multiple_choices=True)
question_form = QuestionForm(
{'question_text': question.question_text, 'pub_date': question.pub_date, 'allow_multiple_choices': 'on' if question.allow_multiple_choices else 'off'})
self.assertTrue(question_form.is_valid())
self.assertEqual(question_form.save(commit=False), question)
AssertionError: <Question: Dummy question> != <Question: Dummy question>
After some manual assertion the object seem to be equal, what am I doing wrong?