<reponame>mechEngineer/DjangoPols<filename>djangoPols/polls/tests.py<gh_stars>0
from django.test import TestCase
import datetime
from django.utils import timezone

from .models import Question

# Create your tests here.


class QuestionModelTests(TestCase):
    def test_was_published_recently_with_future_question(self):
        time = timezone.now() + datetime.timedelta(days=30)
        future_q = Question(pub_date=time)
        self.assertIs(future_q.was_published_recently(), False)

from django.test import TestCase
import datetime
from django.utils import timezone

from .models import Question

# Create your tests here.


class QuestionModelTests(TestCase):
    def test_was_published_recently_with_future_question(self):
        time = timezone.now() + datetime.timedelta(days=30)
        future_q = Question(pub_date=time)
        self.assertIs(future_q.was_published_recently(), False)
# Create your tests here.