production-salesforce-org-rejects-notestrun-test-level

Salesforce production orgs reject deployments with TestLevel=NoTestRun — this is an API business rule enforced by Salesforce, not a bug. Valid test levels for production are RunLocalTests, RunAllTestsInOrg, or RunSpecifiedTests. Sandbox orgs accept NoTestRun. The sandbox boolean in deploy() gates which test levels are permissible.