TDD (3) 썸네일형 리스트형 Django 일부만 Test 하기 python manage.py test로 테스트 하면 App의 tests.py 파일내의 전체 test 소스가 test 된다. 이럴 땐 직접 method를 지정하여 Test를 실행 시키면 된다. python manage.py test blog.tests.TestView.test_post_list Django TDD beautifulsoup4 사용하기 Django에는 화면 Test를 자동화 해주는 도구가 있다. pip install beautifulsoup4 이를 이용하면 화면을 브라우저로 실행해 보지 않아도 테스트가 가능하다. django TDD Test 실행 방법 python manage.py test django의 각 app에는 tests.py가 있고 거기에 Test Source를 작성하면 됩니다. class TestView(TestCase): def test_post_list(self): self.assertEqual(2, 3) 결과 2는 3이 아니므로 Test는 Fail이 됩니다. $ python manage.py test Found 1 test(s). Creating test database for alias 'default'... System check identified no issues (0 silenced). F =================================================================.. 이전 1 다음