Esempio n. 1
0
 def test_prettytime_should_return_never(self):
     """
     Verify cases where the prettytime function should return the string 'never'
     :return:
     """
     self.assertEqual('never', go.prettytime(420))
     self.assertEqual('never', go.prettytime(-1))
Esempio n. 2
0
File: go_test.py Progetto: p16n/f5go
 def test_prettytime_should_return_never(self):
     """
     Verify cases where the prettytime function should return the string 'never'
     :return:
     """
     self.assertEqual('never', go.prettytime(420))
     self.assertEqual('never', go.prettytime(-1))
Esempio n. 3
0
 def test_prettytime_should_return_num_of_months(self):
     """
     Verify case where the prettytime function should return the string number of months
     :return:
     """
     timestamp = time.time() - (95 * 24 * 3600)
     self.assertEqual('3 months ago', go.prettytime(timestamp))
Esempio n. 4
0
 def test_prettytime_should_return_yesterday(self):
     """
     Verify case where the prettytime function should return the string 'yesterday'
     :return:
     """
     timestamp = time.time() - (24 * 3600)
     self.assertEqual('yesterday', go.prettytime(timestamp))
Esempio n. 5
0
File: go_test.py Progetto: p16n/f5go
 def test_prettytime_should_return_num_of_months(self):
     """
     Verify case where the prettytime function should return the string number of months
     :return:
     """
     timestamp = time.time() - (95 * 24 * 3600)
     self.assertEqual('3 months ago', go.prettytime(timestamp))
Esempio n. 6
0
File: go_test.py Progetto: p16n/f5go
 def test_prettytime_should_return_yesterday(self):
     """
     Verify case where the prettytime function should return the string 'yesterday'
     :return:
     """
     timestamp = time.time() - (24 * 3600)
     self.assertEqual('yesterday', go.prettytime(timestamp))