#31476: Django Tutorial 5 - Testing create_question issue - Assertion Failure
-----------------------------------+--------------------------------------
Reporter: Anthony Davie | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 3.0
Severity: Normal | Resolution: invalid
Keywords: tutorial, testing | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------------------------
Comment (by dasbairagya):
this is my case but no luck
{{{
def create_question(question_text, days):
"""
Create a question with the given `question_text` and published the
given number of `days` offset to now (negative for questions published
in the past, positive for questions that have yet to be published).
"""
time = timezone.now() + datetime.timedelta(days=days)
return Question.objects.create(question_text=question_text,
pub_date=time)
}}}
please have a look here
https://code.djangoproject.com/ticket/32816#comment:2
--
Ticket URL: <https://code.djangoproject.com/ticket/31476#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070183b7d74e7c-b1dbeceb-f10c-4b38-bb6d-115eb7797206-000000%40eu-central-1.amazonses.com.