"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".

Replace this with more appropriate tests for your application.
"""

from django.test import TestCase


class SimpleTest(TestCase):
    def test_basic_addition(self):
        """
        Tests that 1 + 1 always equals 2.
        """
        self.assertEqual(1 + 1, 2)

import datetime

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

from apps.polls.models import Poll


class PollMethoTests(TestCase):
	def test_was_published_recently_with_future_poll(self):
		"""
		was_published_recently() should return False for polls whose
		pub_date is in the future
		"""
		future_poll = Poll(pub_date=timezone.now() + datetime.timedelta(days=30))
		self.assertEqual(future_poll.was_published_recently(),False)
		

Create a test to expose the bug
Create a test to expose the bug
