Exemplo n.º 1
0
 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))
Exemplo n.º 2
0
Arquivo: go_test.py Projeto: p16n/f5go
 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))
Exemplo n.º 3
0
 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))
Exemplo n.º 4
0
 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))
Exemplo n.º 5
0
Arquivo: go_test.py Projeto: p16n/f5go
 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))
Exemplo n.º 6
0
Arquivo: go_test.py Projeto: p16n/f5go
 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))
Exemplo n.º 7
0
 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))
Exemplo n.º 8
0
Arquivo: go_test.py Projeto: p16n/f5go
 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))