def METHOD_NAME(self):
    input = "2017-01-01T12:30Z"
    actual = get_datetime_type(True)(input)
    expected = "2017-01-01T12:30Z"
    self.assertEqual(actual, expected)
    input = "2017-01-01 12:30"
    with self.assertRaises(ValueError):
        get_datetime_type(True)(input)