예제 #1
0
파일: utils_test.py 프로젝트: Roche/salt
    def test_jid_to_time(self):
        test_jid = 20131219110700123489
        expected_jid = '2013, Dec 19 11:07:00.123489'
        self.assertEqual(utils.jid_to_time(test_jid), expected_jid)

        # Test incorrect lengths
        incorrect_jid_lenth = 2012
        self.assertEqual(utils.jid_to_time(incorrect_jid_lenth), '')
예제 #2
0
    def test_jid_to_time(self):
        test_jid = 20131219110700123489
        expected_jid = '2013, Dec 19 11:07:00.123489'
        self.assertEqual(utils.jid_to_time(test_jid), expected_jid)

        # Test incorrect lengths
        incorrect_jid_lenth = 2012
        self.assertEqual(utils.jid_to_time(incorrect_jid_lenth), '')