In Python < 3.12, MagicMock's will blindly call any method provided to them, which is masking a real issue in this testcase. The correct method is assert_called_with(), and even worse, one of the arguments provided isn't correct either. Correct the method call, and provide the correct argument.
In Python < 3.12, MagicMock's will blindly call any method provided to them, which is masking a real issue in this testcase. The correct method is assert_called_with(), and even worse, one of the arguments provided isn't correct either. Correct the method call, and provide the correct argument.