def test_seconds_without_time_unit(self): timedict = {'digital_unit': '12', 'time_unit': None} self.assertEqual(12, to_seconds(**timedict))
def test_seconds(self): timedict = {'digital_unit': '10', 'time_unit': 's'} self.assertEqual(10, to_seconds(**timedict))
def test_hours(self): timedict = {'digital_unit': '4', 'time_unit': 'h'} self.assertEqual(14400, to_seconds(**timedict))
def test_minutes(self): timedict = {'digital_unit': '26', 'time_unit': 'm'} self.assertEqual(1560, to_seconds(**timedict))
def test_days(self): timedict = {'digital_unit': '2', 'time_unit': 'd'} self.assertEqual(172800, to_seconds(**timedict))