def test_should_deserialize_timedelta(self):
     instance = {
         "__type": "TimeDelta",
         "days": 12,
         "seconds": 0,
         "microseconds": 0
     }
     schema_instance = ScheduleIntervalSchema()
     result = schema_instance.load(instance)
     expected_instance = datetime.timedelta(days=12)
     self.assertEqual(expected_instance, result)
 def test_should_deserialize_relative_delta(self):
     instance = {"__type": "RelativeDelta", "days": 12, "seconds": 0}
     schema_instance = ScheduleIntervalSchema()
     result = schema_instance.load(instance)
     expected_instance = relativedelta.relativedelta(days=+12)
     self.assertEqual(expected_instance, result)