예제 #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')
예제 #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')
예제 #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')
예제 #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')