@@ -134,10 +134,6 @@ def test_main_ok_exist_article_id(self):
134134 expected_items = {
135135 'article_id' : target_article_id ,
136136 'user_id' : target_user_id ,
137- 'reason' : target_reason ,
138- 'plagiarism_url' : target_plagiarism_url ,
139- 'plagiarism_description' : target_plagiarism_description ,
140- 'illegal_content' : target_illegal_content ,
141137 'created_at' : 1520150272000003
142138 }
143139
@@ -385,7 +381,7 @@ def test_validation_invalid_reason(self):
385381 body = {
386382 'body' : json .dumps ({'reason' : 'abcde' })
387383 }
388- params = dict (self .get_parameters_other_than_body (), ** body )
384+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
389385 self .assert_bad_request (params )
390386
391387 def test_validation_required_plagiarism_detail_when_reason_is_plagiarism (self ):
@@ -396,7 +392,7 @@ def test_validation_required_plagiarism_detail_when_reason_is_plagiarism(self):
396392 }
397393 )
398394 }
399- params = dict (self .get_parameters_other_than_body (), ** body )
395+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
400396 self .assert_bad_request (params )
401397
402398 def test_validation_invalid_plagiarism_url_when_reason_is_plagiarism (self ):
@@ -408,7 +404,7 @@ def test_validation_invalid_plagiarism_url_when_reason_is_plagiarism(self):
408404 }
409405 )
410406 }
411- params = dict (self .get_parameters_other_than_body (), ** body )
407+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
412408 self .assert_bad_request (params )
413409
414410 def test_validation_required_illegal_content_when_reason_is_illegal (self ):
@@ -419,7 +415,7 @@ def test_validation_required_illegal_content_when_reason_is_illegal(self):
419415 }
420416 )
421417 }
422- params = dict (self .get_parameters_other_than_body (), ** body )
418+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
423419 self .assert_bad_request (params )
424420
425421 def test_validation_required_illegal_content_when_reason_is_other (self ):
@@ -430,7 +426,7 @@ def test_validation_required_illegal_content_when_reason_is_other(self):
430426 }
431427 )
432428 }
433- params = dict (self .get_parameters_other_than_body (), ** body )
429+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
434430 self .assert_bad_request (params )
435431
436432 def test_validation_plagiarism_description_max (self ):
@@ -442,7 +438,7 @@ def test_validation_plagiarism_description_max(self):
442438 }
443439 )
444440 }
445- params = dict (self .get_parameters_other_than_body (), ** body )
441+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
446442 self .assert_bad_request (params )
447443
448444 def test_validation_illegal_content_max (self ):
@@ -454,7 +450,7 @@ def test_validation_illegal_content_max(self):
454450 }
455451 )
456452 }
457- params = dict (self .get_parameters_other_than_body (), ** body )
453+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
458454 self .assert_bad_request (params )
459455
460456 def get_article_fraud_user (self , article_id , user_id ):
@@ -464,7 +460,7 @@ def get_article_fraud_user(self, article_id, user_id):
464460 article_fraud_user_table = self .dynamodb .Table (os .environ ['ARTICLE_FRAUD_USER_TABLE_NAME' ])
465461 return article_fraud_user_table .query (** query_params )['Items' ][0 ]
466462
467- def get_parameters_other_than_body (self ):
463+ def get_parameters_other_than_body_for_validate (self ):
468464 basic_params = {
469465 'pathParameters' : {
470466 'article_id' : self .article_fraud_user_table_items [5 ]['article_id' ]
0 commit comments