Inflearn brand logo image
Inflearn brand logo image
채널톡 아이콘

인프런 커뮤니티 질문&답변

Peter Kam님의 프로필 이미지

작성한 질문수 4

파이썬 사용자를 위한 웹개발 입문 A to Z Django + Bootstrap

test 결과 두 가지 error 가 발생했습니다. 뭐가 잘못된 건지 도저히 모르겠습니다.

작성

·

354

0

ERROR: test_post_detail (blog.tests.TestView)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\sungk\Git\django_website\blog\tests.py", line 276, in test_post_detail

    self.assertIn(post_000.title, main_div)

  File "C:\Users\sungk\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 1095, in assertIn

    if member not in container:

TypeError: argument of type 'NoneType' is not iterable

======================================================================

FAIL: test_tag (blog.tests.TestModel)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "C:\Users\sungk\Git\django_website\blog\tests.py", line 94, in test_tag

    self.assertEqual(tag_001.post_set.first(), post_001) # 하나의 tag는 자신을 가진 post들을 불러올 수 있다.

AssertionError: <Post: The first post :: smith> != <Post: Stay Fool, Stay Hungry :: smith>

답변 1

0

Peter Kam님의 프로필 이미지
Peter Kam
질문자

에러 무시하고 진행했는데 별 탈 없이 다 작동하네요