def test_get_time_object_3(self): """get_time_object(...) with empty request object {} must raise Exception""" request_args = {} with self.assertRaises(Exception): result = get_time_object(request_args)
def test_get_time_object_4(self): """get_time_object(...) with request object {"var": "value"} must raise Exception""" request_args = {"var": "value"} with self.assertRaises(Exception): result = get_time_object(request_args)
def test_get_time_object_2(self): """get_time_object(...) with request {when:tomorrow} must return a timeutil object""" request_args = {"when": "tomorrow"} result = get_time_object(request_args) self.assertEqual(type(result), type(timeutils.tomorrow()))