"Writing Your First Django App, Part 5" quotes

As you can see, when I run the tests.py I fail due to the queryset having quotes around each entry and the question does not. I am not sure if the view is causing it but I’m frustrated. Ive tried a lot of ways to add quotes to the question or remove quotes from the queryset but none worked.

Failure:

FAIL: test_future_question_and_past_question (polls.tests.QuestionIndexViewTests)
Even if both past and future questions exist, only past questions
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sio/djangotutorial/polls/tests.py", line 92, in test_future_question_and_past_question
    self.assertQuerysetEqual(qs, [question])
  File "/home/sio/.local/lib/python3.9/site-packages/django/test/testcases.py", line 1052, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: ['<Question: Past question.>'] != [<Question: Past question.>]

First differing element 0:
'<Question: Past question.>'
<Question: Past question.>

- ['<Question: Past question.>']
?  -                          -

+ [<Question: Past question.>]

Indexview in views.py

Method in tests.py:

 def test_future_question_and_past_question(self):
        """
        Even if both past and future questions exist, only past questions
        are displayed.
        """
        question = create_question(question_text="Past question.", days=-30)
        create_question(question_text="Future question.", days=30)
        response = self.client.get(reverse("polls:index"))
        self.assertQuerysetEqual(response.context["latest_question_list"], [question],)

It looks like you’re using Python 3.9. What version of Django are you running?
(Django 5.0+ is not compatible with Python 3.9, it needs to use Python 3.10+. See FAQ: Installation | Django documentation | Django)

If you are using Django 4.x, please post your create_question function. (Note: Please do not post any images of code or other textual information.)

The version I am using is Django 3.1.7. And yes, python 3.9. I see now that I was using the 5.1 tutorial.