[Answered ]-How to mock instance attribute of django form

1👍

You might need to mock the form on where it is used in your view since it’s already imported there before your mock runs.

So something like:

@patch('my_app.my_views.PaymentForm')

Leave a comment