def test_interval_deserializing(self): """Correct deserialization.""" data = {'every': 7, 'period': 'days'} i = Interval.from_dict(data) self.assertEqual(i.period, 'days') self.assertEqual(i.every, 7)
def test_interval_deserializing_no_data(self): """No data when deserializing.""" i = Interval.from_dict(None) self.assertIsNone(i)