@@ -134,10 +134,6 @@ def test_main_ok_exist_article_id(self):
134
134
expected_items = {
135
135
'article_id' : target_article_id ,
136
136
'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 ,
141
137
'created_at' : 1520150272000003
142
138
}
143
139
@@ -385,7 +381,7 @@ def test_validation_invalid_reason(self):
385
381
body = {
386
382
'body' : json .dumps ({'reason' : 'abcde' })
387
383
}
388
- params = dict (self .get_parameters_other_than_body (), ** body )
384
+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
389
385
self .assert_bad_request (params )
390
386
391
387
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):
396
392
}
397
393
)
398
394
}
399
- params = dict (self .get_parameters_other_than_body (), ** body )
395
+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
400
396
self .assert_bad_request (params )
401
397
402
398
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):
408
404
}
409
405
)
410
406
}
411
- params = dict (self .get_parameters_other_than_body (), ** body )
407
+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
412
408
self .assert_bad_request (params )
413
409
414
410
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):
419
415
}
420
416
)
421
417
}
422
- params = dict (self .get_parameters_other_than_body (), ** body )
418
+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
423
419
self .assert_bad_request (params )
424
420
425
421
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):
430
426
}
431
427
)
432
428
}
433
- params = dict (self .get_parameters_other_than_body (), ** body )
429
+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
434
430
self .assert_bad_request (params )
435
431
436
432
def test_validation_plagiarism_description_max (self ):
@@ -442,7 +438,7 @@ def test_validation_plagiarism_description_max(self):
442
438
}
443
439
)
444
440
}
445
- params = dict (self .get_parameters_other_than_body (), ** body )
441
+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
446
442
self .assert_bad_request (params )
447
443
448
444
def test_validation_illegal_content_max (self ):
@@ -454,7 +450,7 @@ def test_validation_illegal_content_max(self):
454
450
}
455
451
)
456
452
}
457
- params = dict (self .get_parameters_other_than_body (), ** body )
453
+ params = dict (self .get_parameters_other_than_body_for_validate (), ** body )
458
454
self .assert_bad_request (params )
459
455
460
456
def get_article_fraud_user (self , article_id , user_id ):
@@ -464,7 +460,7 @@ def get_article_fraud_user(self, article_id, user_id):
464
460
article_fraud_user_table = self .dynamodb .Table (os .environ ['ARTICLE_FRAUD_USER_TABLE_NAME' ])
465
461
return article_fraud_user_table .query (** query_params )['Items' ][0 ]
466
462
467
- def get_parameters_other_than_body (self ):
463
+ def get_parameters_other_than_body_for_validate (self ):
468
464
basic_params = {
469
465
'pathParameters' : {
470
466
'article_id' : self .article_fraud_user_table_items [5 ]['article_id' ]
0 commit comments