Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytest fixture user() is being re-defined #370

Open
1 task done
hcho3 opened this issue Dec 25, 2020 · 0 comments
Open
1 task done

Pytest fixture user() is being re-defined #370

hcho3 opened this issue Dec 25, 2020 · 0 comments

Comments

@hcho3
Copy link

hcho3 commented Dec 25, 2020

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:
    • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant