def test_prettyday_should_return_never(self): """ Verify cases where the prettyday function should return the string 'never' :return: """ self.assertEqual('never', go.prettyday(0)) self.assertEqual('never', go.prettyday(-1))
def test_prettyday_should_return_yesterday(self): """ Verify case where the prettyday function should return the string 'yesterday' :return: """ yesterday = go.today() - 1 self.assertEqual('yesterday', go.prettyday(yesterday))
def test_prettyday_should_return_today(self): """ Verify case where the prettyday function should return the string 'today' :return: """ _today = go.today() self.assertEqual('today', go.prettyday(_today))
def test_prettyday_should_return_num_of_months(self): """ Verify cases where the prettyday function should return the string for the number of months :return: """ today = go.today() months_ago = today - 95 self.assertEqual('3 months ago', go.prettyday(months_ago))