def test_format(self):
     assert (
         DurationType.get_formatter(None)(timedelta(days=5, minutes=6))
         == "5 days, 0:06:00"
     )
     assert DurationType.get_formatter(None)(timedelta(minutes=6)) == "0:06:00"
     assert DurationType.get_formatter(None)(None) is None
 def test_validate(self):
     assert DurationType.parse("gt", "5 days") == (timedelta(days=5), None)
     assert DurationType.parse("gt", "5 5:5") == (
         timedelta(days=5, hours=5, minutes=5),
         None,
     )
     assert DurationType.parse("gt", "5 dayss") == (None, ANY(str))
     assert DurationType.parse("pontains", "5 days") == (None, ANY(str))
     assert DurationType.parse("is_null", "True") == (True, None)
     assert DurationType.parse("is_null", "hello") == (None, ANY(str))