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')
Source:stackexchange.com