Spaces:
Running
on
Zero
Running
on
Zero
File size: 322 Bytes
1f074d8 |
1 2 3 4 5 6 7 |
from django.test import TestCase
from .models import Question
class QuestionModelTest(TestCase):
def test_was_published_recently_with_future_question(self):
future_question = Question(pub_date=timezone.now() + datetime.timedelta(days=30))
self.assertIs(future_question.was_published_recently(), False) |