Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #8
0
 def test_post_posts_non_body(self):
     response = Client().post_posts()
     status_code_check(response, codes.created)
Beispiel #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)
Beispiel #10
0
 def test_delete_by_id(self, id):
     response = Client().delete_posts_by_id(id)
     status_code_check(response, codes.ok)