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)
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)
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)
def test_get_posts_by_invalid_id(self, id): response = Client().get_posts_by_id(id) status_code_check(response, codes.bad_request)
def test_get_posts_by_nonexistent_id(self, id): response = Client().get_posts_by_id(id) status_code_check(response, codes.not_found)
def test_post_posts_by_invalid_str_body(self, body): response = Client().post_posts_by_body(body) status_code_check(response, codes.bad_request)
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)
def test_post_posts_non_body(self): response = Client().post_posts() status_code_check(response, codes.created)
def test_post_posts_by_json_body(self, body_json): response = Client().post_posts_by_body(body_json) status_code_check(response, codes.created)
def test_delete_by_id(self, id): response = Client().delete_posts_by_id(id) status_code_check(response, codes.ok)