장고 테스트 환경
[django] More comprehensive tests
[django] More comprehensive tests
2015. 7. 28.More comprehensive tests 아래와 같이 2개의 메서드 추가해서 테스트 실시 polls/tests.pyimport datetime from django.utils import timezonefrom django.test import TestCase from .models import Question class QuestionMethodTests(TestCase): def test_was_published_recently_with_old_question(self): time = timezone.now() + datetime.timedelta(days=30) old_question = Question(pub_date=time) self.assertEqual(old_question.was_pu..