django-crash-course
django-crash-course copied to clipboard
Pytest fixture user() is being re-defined
Location within the Book
- Book order number: 11385
- Book build date (Is the date on page 1): September 16, 2020
- Book format (PDF, Epub or Mobi): PDF
- Chapter or Appendix: Chapter
- Section: 53
- Subsection: 4
- What operating system are you using:
- [x] MacOS Catalina
Hint: Page numbers change all the time. The best way to report an issue is by chapter, section, and subsection numbers.
Description
The section 53.4 instructs the reader to add the following snippet to test_views.py:
@pytest.fixture
def user():
return UserFactory()
This is redundant because the fixture user() is already defined in conftest.py. The conftest.py is provided by django-crash-starter.
Possible Solutions
Instruct the reader to refer to the fixture user() in conftest.py.
Your full name so we can provide accurate credit within the book
Hyunsu Cho