I am trying to deploy a new piece of Apex that conducts some internal Salesforce operations (inserting a number into a field based on another field).
The test involves inserting a lead into Salesforce, running the script and then asserting if it made the desired change.
I wrote the test for it, got 80% coverage and was deploying from Sandbox into Production when I started getting callout errors ('Method does not support web service callouts'). The problem I am having is that I also have some triggers that get triggered upon insert of a new lead and make external http callouts to various APIs.
How do I handle for them? Do I need to include mock Http callout class within this test even though it's 100% internal to Salesforce? Why do I need even handle those triggers if my deployment has nothing to do with them? Any way I can isolate this test and stop the callouts from happening?