All Coursera Quiz Answers

Security and Testing Quiz Answers

In this article i am gone to share Coursera Course: Back-End Developer Capstone by Meta Week 3 | Security and Testing Quiz Answers with you..

Also visit:  Project Functionality Quiz Answers

 

Security and Testing Quiz Answers

Question 1)
You can enforce authentication to the model view by adding which of the following to the view class?

  • Authenticated=true
  • IsAuthenticated
  • Authenticated=false
  • ForceAuthentication=true

Question 2)
A REST API needs to have a ________ to convert models into JSON format.

  • translator
  • serializer
  • deserializer

Question 3)
Which types of authentication schemes are in-built into the Django REST framework? Select all that apply.

  • SessionAuthentication
  • BasicAuthentication
  • JWTAuthentication
  • TokenAuthentication

Question 4)
True or false: The browsable API provided by DRF allows for all CRUD operations to be performed.

  • True
  • False

Question 5)
Which of the following is an API testing tool? Select all that apply.

  • Git
  • Curl
  • Postman
  • Insomnia

Question 6)
Which of the following is a command option for the manage.py script to run unit tests?

  • test
  • TestRunner
  • TestCase
  • unittest

Question 7)
Using ________, we can limit how many records show up on each page and allow users to decide how many records they would like to view at a time.

  • modularization
  • pagination
  • rate limiting
  • throttling

Question 8)
Select two advantages to using microservices over a monolithic code-base.

  • Large code-bases are easier to maintain.
  • Smaller problems are easier to solve.
  • Splitting an application into multiple apps means it is as decoupled as possible from each other application.
  • Keeping it all together makes it easier to add new applications.

Question 9)
What method is used in a unit test to confirm that a piece of data is of a specific type, like a string?

  • assertIsType
  • assertIsInstance
  • assertType
  • assertIsString

Question 10)
Which of the following defines the process of verifying a user is allowed to view certain data?

  • authorization
  • credentials
  • serialization
  • authentication

 

Question 11)
True or false: Insomnia’s browser extension has all the same features as its desktop application.

  • True
  • False

Question 12)
True or False: Testing before releasing to production is crucial to proper software development.

  • True
  • False

Question 13)
Complete the following sentence. In a DRF API, an unauthenticated response contains the ________ status code.

  • 404 Not Found
  • 401 Unauthorized
  • 501 Not Implemented
  • 201 Created

Question 14)
True or False: To run the unit tests on a Django application, you must install the unittest library with pip.

  • True
  • False

Question 15)
Which of the following options are available when you use the Djoser library? Select all that apply.

  • /jwt/create/
  • *D: /token/login/
  • /users/me/
  • api-token-auth/

Question 16)
True or false: For organizational purposes it is best to keep an application all together inside one application.

  • True
  • False

Question 17)
Why is password-based authentication not recommended in the Django REST Framework? Select all that apply.

  • It is deprecated.
  • It is insecure.
  • It is tedious and time-consuming.
  • It is not supported by the HTTPS protocol.

Question 18)
Which of the following types of authentication is typically only used in testing?

  • session authentication
  • token-based authentication
  • remote user authentication
  • basic authentication

Question 19)
Which two HTTP methods does ListCreateView handle?

  • DELETE
  • GET
  • PUT
  • POST

Question 20)
Complete the following sentence: Token-based authentication is suitable for ___________.

  • untrusted clients
  • client-server setups
  • AJAX clients
  • testing purposes

Question 21)
Select the three options in the top menu of Insomnia.

  • Test
  • Code
  • Design
  • Execute
  • Debug

Question 22)
True or false: Testing a web application is quick and easy due to how DRF handles it.

  • True
  • False

Question 23)
Which decorator is used in unit tests to specify that they are used for a specific class?

  • @testmethod
  • @classtest
  • @classmethod
  • @testclass

Question 24)
Which of the following defines the process of a user logging in?

  • credentials
  • serialization
  • authentication
  • authorization

Question 25)
True or false: Testing a web application can be difficult as it involves action at several layers.

  • True
  • False

Question 25)
True or False: To run the unit tests on a Django application, you must install the unittest library with pip.

  • True
  • False

Question 27)
What method is used to create data in a unit test that can be used to test a model?

  • setupTestData
  • unitTestData
  • classTestData
  • modelTestData

Question 28)
What response should a user receive if denied permission due to not being authenticated?

  • 404
  • 401
  • 501
  • 400

Question 29)
Which of the following is the best type of authentication for applications that interact with desktop and mobile clients?

  • Token-based authentication
  • Password-based authentication
  • Biometric authentication.
  • Certificate-based authentication