Test your knowledge

Let's see whether you can answer the following questions correctly.

  1. In a subclass of APITestCase, self.client is:
    1. The APITestCase instance that allows us to easily compose and send HTTP requests for testing
    2. The APITestClient instance that allows us to easily compose and send HTTP requests for testing
    3. The APIClient instance that allows us to easily compose and send HTTP requests for testing
  2. Which of the following lines clean up the credentials of a method within a subclass of APITestCase?
    1. self.client.credentials()
    2. self.client.clean_credentials()
    3. self.client.credentials = {}
  3. Which of the following methods for self.client in a method within a subclass of APITestCase allows us to make an HTTP POST request?
    1. http_post
    2. make_http_post_request
    3. post
  4. Which of the following methods for self.client in a method within a subclass of APITestCase allows us to make an HTTP GET request?
    1. http_get
    2. make_http_get_request
    3. get
  5. Which of the following methods for self.client in a method within a subclass of APITestCase allows us to make an HTTP PATCH request?
    1. http_patch
    2. make_http_patch_request
    3. patch

 

The rights answers are included in the AppendixSolutions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.141.6