Python Programming - Testing - Discussion

Discussion Forum : Testing - General Questions (Q.No. 74)
74.
In Python's unittest.mock module, what does the MagicMock.assert_called_once method do?
Asserts that a method was called exactly once
Asserts that a method was not called
Asserts that a method was called with specific arguments
Asserts that a method was called with any arguments
Answer: Option
Explanation:
The assert_called_once method in Python's unittest.mock module asserts that a method was called exactly once.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.