@@ -321,11 +321,11 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
321321update = [
322322 {'space_id' : 512 },
323323 {'value' : 1 },
324- {'string' : '=,1 ,some XXXX big string' },
325- {'float' : '-,2 ,2.1' },
326- {'double' : '=,3 ,4.1' },
327- {'bool' : '=,4 ,false' },
328- {'int' : '%2B,5 ,1001' }
324+ {'string' : '=,2 ,some XXXX big string' },
325+ {'float' : '-,3 ,2.1' },
326+ {'double' : '=,4 ,4.1' },
327+ {'bool' : '=,5 ,false' },
328+ {'int' : '%2B,6 ,1001' }
329329]
330330
331331expected = [
@@ -371,7 +371,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
371371 {'index_id' : 1 },
372372 {'key' : 1 },
373373 {'key1' : 'str' },
374- {'string' : '=,2 ,updated string' }
374+ {'string' : '=,3 ,updated string' }
375375]
376376
377377expected = [
@@ -393,7 +393,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
393393 {'space_id' : 514 },
394394 {'key' : 2 },
395395 {'key1' : 'str2' },
396- {'string' : '=,2 ,Text' }
396+ {'string' : '=,3 ,Text' }
397397]
398398
399399result = get_success (BASE_URL + '/upsert_fmt' , upsert , None , False )
@@ -403,7 +403,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
403403 {'space_id' : 514 },
404404 {'key' : 2 },
405405 {'key1' : 'str2' },
406- {'string' : '=,2 ,' }
406+ {'string' : '=,3 ,' }
407407]
408408
409409result = get_success (BASE_URL + '/upsert_fmt' , upsert , None , False )
@@ -445,8 +445,8 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
445445result = post_form_success (BASE_URL + '/select_post' , {'id' : 11 }, None )
446446assert result ['result' ][0 ][0 ] == 11 and result ['result' ][1 ][0 ] == 12 , \
447447 'Expected != result'
448- result = post_form_success (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,1 ,TEXT' ,
449- 'value1' : '=,2 ,3.14' }, None )
448+ result = post_form_success (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,2 ,TEXT' ,
449+ 'value1' : '=,3 ,3.14' }, None )
450450assert result ['result' ][0 ][0 ] == 12 and result ['result' ][0 ][1 ] == 'TEXT' \
451451 and result ['result' ][0 ][2 ] == 3.14 , 'Expected != result'
452452
@@ -457,27 +457,25 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
457457print ('[+] Update format validation' )
458458
459459_ , result = post_form (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,TEXT' ,
460- 'value1' : '=,2 ,3.14' }, None )
460+ 'value1' : '=,3 ,3.14' }, None )
461461assert _ == 400 and 'error' in result , 'Expected != result'
462462
463463_ , result = post_form (BASE_URL + '/update_post' , {'id' : 12 , 'value' : 'TEXT' ,
464- 'value1' : '=,2 ,3.14' }, None )
464+ 'value1' : '=,3 ,3.14' }, None )
465465assert _ == 400 and 'error' in result , 'Expected != result'
466466_ , result = post_form (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,,TEXT' ,
467- 'value1' : '=,2 ,3.14' }, None )
467+ 'value1' : '=,4 ,3.14' }, None )
468468assert _ == 400 and 'error' in result , 'Expected != result'
469469_ , result = post_form (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,TEXT' ,
470- 'value1' : '=,2 ,3.14' }, None )
470+ 'value1' : '=,3 ,3.14' }, None )
471471assert _ == 400 and 'error' in result , 'Expected != result'
472472
473473print ('[+] OK' )
474474
475475# ============
476476#
477- print (''' [+] Issues
478- https://github.com/tarantool/nginx_upstream_module/issues/110 and
479- https://github.com/tarantool/nginx_upstream_module/issues/111
480- ''' )
477+ print ('''[+] Issues https://github.com/tarantool/nginx_upstream_module/issues/110 and
478+ https://github.com/tarantool/nginx_upstream_module/issues/111''' )
481479
482480## Issue 111
483481_ , result = delete (BASE_URL + '/issue_110_and_111' , \
@@ -489,7 +487,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
489487 None )
490488
491489result = put_success (BASE_URL + '/issue_110_and_111' , \
492- {'key' : 'test_inc' , 'value' : '#,1 ,10' }, None , True )
490+ {'key' : 'test_inc' , 'value' : '#,2 ,10' }, None , True )
493491assert result [0 ] == 'test_inc' , "Expected != Result"
494492
495493result = get_success (BASE_URL + '/issue_110_and_111' , \
@@ -508,7 +506,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
508506 None )
509507
510508_ , result = patch (BASE_URL + '/issue_110_and_111' , \
511- {'key' : 'test_inc_2' , 'new_value' : 1 , 'updated_value' : '+,1 ,5' })
509+ {'key' : 'test_inc_2' , 'new_value' : 1 , 'updated_value' : '+,2 ,5' })
512510assert _ == 200 and 'result' in result and 'id' in result , \
513511 'expected: result and id'
514512
@@ -517,7 +515,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
517515assert result [1 ] == 6 , "Expected != Result"
518516
519517_ , result = patch (BASE_URL + '/issue_110_and_111' , \
520- {'key' : 'test_inc_2' , 'new_value' : 1 , 'updated_value' : '=,1 ,5' })
518+ {'key' : 'test_inc_2' , 'new_value' : 1 , 'updated_value' : '=,2 ,5' })
521519assert _ == 200 and 'result' in result and 'id' in result , \
522520 'expected: result and id'
523521result = get_success (BASE_URL + '/issue_110_and_111' , \
0 commit comments