DRAG DROP - Drag and drop the code snippets from the bottom to the blanks in the code to test the API response through the Python unittest library. Not all options are used. Select and Place:
"response.content" won't return the content type, "response.content_type" doesn't exist. This question has no correct answer as long as we have only the listed options.
Best matching are:
status_code
200
content
none
"status_code = response.status_code" wouldn't work though, since "response" is not defined. It' named "resp" in the line before.
Also "self.assertEqual(resp.content, 'application/json')" will always fail, since the response content-type is part of the header. The correct way would be:
self.assertEqual(resp.headers["content-type"], 'application/json')
This section is not available anymore. Please use the main Exam Page.200-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
AJ7428
Highly Voted 2 years, 5 months agoherrmann69
9 months agoToTheBone
2 years agoPrajwalEM
Highly Voted 2 years, 6 months agomacxsz
2 years, 4 months agocerifyme85
1 year, 9 months agoFrap
1 year, 9 months agokymoni
Most Recent 6 months, 3 weeks agoherrmann69
9 months agobrunorpacheco
1 year, 9 months agoEAG
11 months, 2 weeks ago