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