Python Programming - Testing - Discussion

Discussion Forum : Testing - General Questions (Q.No. 49)
49.
What is the purpose of the unittest.mock.MagicMock.side_effect attribute?
Adds a magical side effect to the test
Specifies the return value of a method
Specifies the call count of a method
Specifies the exception to be raised by a method
Answer: Option
Explanation:
The side_effect attribute in Python unittest.mock.MagicMock is used to specify the exception to be raised by a method.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.