Ejemplo n.º 1
0
 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')
Ejemplo n.º 2
0
 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')
Ejemplo n.º 3
0
 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')
Ejemplo n.º 4
0
 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')