def test_not_the_season(self): self.today = (2014, 1, 25) result = receivers.christmas(None, content="It's nearly christmas") self.assertEqual(result, None)
def test_its_nearly_christmas(self): self.today = (2014, 12, 24) result = receivers.christmas(None, content="It's nearly christmas") self.assertEqual(result['content'], "only 1 days 'til Christmas!")
def test_im_fedup_of_christmas(self): self.today = (2014, 12, 26) result = receivers.christmas(None, content="It's nearly christmas") self.assertEqual(result, None)
def test_its_christmas(self): self.today = (2014, 12, 25) result = receivers.christmas(None, content="It's nearly christmas") self.assertEqual(result['content'], "It's christmas \o/")