def test_given_json_pointer_is_rand_date_non_default_format(self): path = util.rand_string() self.ctx.zato.date_formats['new'] = 'YY-DD-MM' json.given_json_pointer_is_rand_date(self.ctx, '/' + path, 'new') assert datetime.strptime(self.ctx.zato.request.data_impl[path], '%y-%d-%m')
def test_given_json_pointer_is_rand_date_default_format(self): path = util.rand_string() json.given_json_pointer_is_rand_date(self.ctx, '/' + path, 'default') assert datetime.strptime(self.ctx.zato.request.data_impl[path], '%Y-%m-%dT%H:%M:%S')