예제 #1
0
 def test_put_posts_by_nonexistent_id(self, id, body_json):
     response = Client().put_posts_by_id(id, body_json)
     status_code_check(response, codes.not_found)
예제 #2
0
 def test_put_posts_by_id(self, id, body_json):
     response = Client().put_posts_by_id(id, body_json)
     status_code_check(response, codes.ok)
예제 #3
0
 def test_put_posts_by_invalid_id(self, id, body_json):
     response = Client().put_posts_by_id(id, body_json)
     status_code_check(response, codes.bad_request)
예제 #4
0
 def test_get_posts_by_invalid_id(self, id):
     response = Client().get_posts_by_id(id)
     status_code_check(response, codes.bad_request)
예제 #5
0
 def test_get_posts_by_nonexistent_id(self, id):
     response = Client().get_posts_by_id(id)
     status_code_check(response, codes.not_found)
예제 #6
0
 def test_post_posts_by_invalid_str_body(self, body):
     response = Client().post_posts_by_body(body)
     status_code_check(response, codes.bad_request)
예제 #7
0
 def test_post_posts_by_invalid_json_body(self, post_invalid_json):
     response = Client().post_posts_by_body(post_invalid_json)
     status_code_check(response, codes.bad_request)
예제 #8
0
 def test_post_posts_non_body(self):
     response = Client().post_posts()
     status_code_check(response, codes.created)
예제 #9
0
 def test_post_posts_by_json_body(self, body_json):
     response = Client().post_posts_by_body(body_json)
     status_code_check(response, codes.created)
예제 #10
0
 def test_delete_by_id(self, id):
     response = Client().delete_posts_by_id(id)
     status_code_check(response, codes.ok)