Exemplo n.º 1
0
 def test_1_datetime(self):
     sec = ''
     self.assertIsNone(my_datetime(sec))
Exemplo n.º 2
0
 def test_10_datetime(self):
     sec = 9876543210
     expected = datetime.utcfromtimestamp(9876543210).strftime("%m-%d-%Y")
     self.assertEqual(my_datetime(sec), expected)
Exemplo n.º 3
0
 def test_11_datetime(self):
     sec = 1596855644
     expected = datetime.utcfromtimestamp(1596855644).strftime("%m-%d-%Y")
     self.assertEqual(my_datetime(sec), expected)
Exemplo n.º 4
0
 def test_8_datetime(self):
     sec = 1091906684
     expected = datetime.utcfromtimestamp(1091906684).strftime("%m-%d-%Y")
     self.assertEqual(my_datetime(sec), expected)
Exemplo n.º 5
0
 def test_9_datetime(self):
     sec = 123456789
     expected = datetime.utcfromtimestamp(123456789).strftime("%m-%d-%Y")
     self.assertEqual(my_datetime(sec), expected)
Exemplo n.º 6
0
 def test_7_datetime(self):
     sec = 172800
     expected = datetime.utcfromtimestamp(172800).strftime("%m-%d-%Y")
     self.assertEqual(my_datetime(sec), expected)
Exemplo n.º 7
0
 def test_6_datetime(self):
     sec = 538341884
     expected = datetime.utcfromtimestamp(538341884).strftime("%m-%d-%Y")
     self.assertEqual(my_datetime(sec), expected)
Exemplo n.º 8
0
 def test_4_datetime(self):
     sec = 63072000
     expected = datetime.utcfromtimestamp(63072000).strftime("%m-%d-%Y")
     self.assertEqual(my_datetime(sec), expected)
Exemplo n.º 9
0
 def test_3_datetime(self):
     sec = -12345
     self.assertIsNone(my_datetime(sec))
Exemplo n.º 10
0
 def test_2_datetime(self):
     sec = 'abcdefg'
     self.assertIsNone(my_datetime(sec))