강의

멘토링

커뮤니티

Inflearn Community Q&A

inflearn1modee's profile image
inflearn1modee

asked

Practice! Introduction to FastAPI

(Practice) Repository Pattern - Repository Pattern

레포지토리 패턴 강의에 pytest 오류가 뜹니다

Resolved

Written on

·

307

0

pytest 실행하면
FAILED tests/test_main.py::test_get_todos - assert 404 == 200

FAILED tests/test_main.py::test_get_todo - assert 404 == 200

FAILED tests/test_main.py::test_create_todo - AttributeError: 'NoneType' object has no attribute 'id'

FAILED tests/test_main.py::test_update_todo - AssertionError: Expected 'undone' to be called once. Called 0 times.

FAILED tests/test_main.py::test_delete_todo - AttributeError: <module 'api.todo' from 'C:\\Users\\user\\Desktop\\project\\todos\\src\\api\\todo.py'> does not have the attribute 'delete

_todo'
라는 오류가 뜹니다...ㅠㅠ

python리팩토링ormFastAPIpytest

Answer 1

0

qu3vipon님의 프로필 이미지
qu3vipon
Instructor

안녕하세요. 해당 부분은 리팩터링과 테스트 코드 변경이 함께 이루어져서 따라하기 힘드셨을 수도 있을 것 같은데요. 에러가 발생하는 테스트 코드를 공유해주시면 디버깅을 도와드릴 수 있을 것 같습니다.

inflearn1modee's profile image
inflearn1modee

asked

Ask a question