feldroy / feldroy/django-crash-course
Pytest fixture user() is being re-defined
- 主要语言
- Shell
- 星标
- 142
- 派生
- 30
- PR 合并指标
- 30 天内没有已合并 PR
描述
## 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`:
```python
@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](https://github.com/feldroy/django-crash-starter/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/%7B%7Bcookiecutter.project_slug%7D%7D/conftest.py).
## 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
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。