def test_format_datetime_accepts_raises_for_none(self): with self.assertRaises(PolyaxonDateTimeFormatterException): DateTimeFormatter.format_datetime(None)
def test_format_datetime_works_as_expected_for_given_datetime(self): result = DateTimeFormatter.format_datetime( datetime(2012, 12, 24, 16, 17, 18)) self.assertEqual(result, "2012-12-24 16:17:18")