• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

강의 마지막 test 에러

19.11.18 20:36 작성 조회수 105

0

안녕하십니까

항상 질문에 답해주시어 여기까지 왔습니다. 감사합니다.

코드는 

login_success = self.client.login(username='obama', password='nopassword')
self.assertTrue(login_success)
response = self.client.get('/blog/edit_comment/{}/'.format(comment_000.pk))
self.assertEqual(response.status_code, 200)

soup = BeautifulSoup(response.content, 'html.parser')
self.assertIn('Edit Comment: ', soup.body.h3)

response = self.client.get(
'/blog/edit_comment/{}/'.format(comment_000.pk),
{'text': 'I was president of the US'},
follow=True
)

self.assertEqual(response.status_code, 200)
soup = BeautifulSoup(response.content, 'html.parser')
self.assertNotIn('I am president of the US', soup.body.text)
self.assertIn('I was president of the US', soup.body.text)

그대로 따라왔습니다. 그런데 첨부파일 과 같은 에러가 뜹니다.


어찌 해결해야할지 조언 부탁드립니다.

답변 1

답변을 작성해보세요.

0

안녕하세요. 매번 열심히 하고 계신 것 같아서 감사할 따름입니다. 

그런데, 지금 주신 정보로는 무엇이 문제인지 판단하기 어렵습니다. I am a president of the US가 나오면 안나오는데 페이지에 나와 있다고 하네요? HTML파일과 views.py 파일도 있어야 알 수 있을 것 같습니다.