Open BalaurZmeu opened 6 months ago
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing#forms
The last two tests which are testing forms are not passing.
def test_renew_form_date_today(self): date = datetime.date.today() form = RenewBookForm(data={'renewal_date': date}) self.assertTrue(form.is_valid()) def test_renew_form_date_max(self): date = timezone.localtime() + datetime.timedelta(weeks=4) form = RenewBookForm(data={'renewal_date': date}) self.assertTrue(form.is_valid())
These two are failing:
FAIL: test_renew_form_date_max (catalog.tests.test_forms.RenewBookFormTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/zmeu/code/Mozilla_Django_Tutorial/locallibrary/catalog/tests/test_forms.py", line 33, in test_renew_form_date_max self.assertTrue(form.is_valid()) AssertionError: False is not true ====================================================================== FAIL: test_renew_form_date_today (catalog.tests.test_forms.RenewBookFormTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/zmeu/code/Mozilla_Django_Tutorial/locallibrary/catalog/tests/test_forms.py", line 28, in test_renew_form_date_today self.assertTrue(form.is_valid()) AssertionError: False is not true -------------------------------------------------------------------
I am following every instruction in the tutorial very carefully. I completed all challenges. I don't know what is wrong.
No response
(@hamishwillee I'm just going to assign Django & Express issues to you so they are on your radar to investigate)
Thanks @Josh-Cena - I'd prefer it that way :-)
MDN URL
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing
What specific section or headline is this issue about?
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing#forms
What information was incorrect, unhelpful, or incomplete?
The last two tests which are testing forms are not passing.
These two are failing:
What did you expect to see?
I am following every instruction in the tutorial very carefully. I completed all challenges. I don't know what is wrong.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
* Folder: `en-us/learn/server-side/django/testing` * MDN URL: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/learn/server-side/django/testing/index.md * Last commit: https://github.com/mdn/content/commit/f7f7ccaf09b65b66e0c995e6df53888288411770 * Document last modified: 2024-02-28T05:13:14.000Z