from locust import HttpLocust, TaskSet, task
from random import randint


class SmsSponsorWorkflow(TaskSet):

    @task(1)
    def send_sms(self):
        url = "/sms/mnc?sender=%2B41789364{}&service=compassion".format(
            randint(100, 999))
        self.client.get(url)


class SmsSponsor(HttpLocust):
    task_set = SmsSponsorWorkflow

from locust import HttpLocust, TaskSet, task
from random import randint


class SmsSponsorWorkflow(TaskSet):

    @task(1)
    def send_sms(self):
        url = "/sms/mnc?sender=%2B4199{}&service=compassion&text=test".format(
            randint(1000000, 9999999))
        self.client.get(url)


class SmsSponsor(HttpLocust):
    task_set = SmsSponsorWorkflow

Replace phone number and avoid sending SMS for load testing
Replace phone number and avoid sending SMS for load testing

  from locust import HttpLocust, TaskSet, task
  from random import randint
  
  
  class SmsSponsorWorkflow(TaskSet):
  
      @task(1)
      def send_sms(self):
-         url = "/sms/mnc?sender=%2B41789364{}&service=compassion".format(
+         url = "/sms/mnc?sender=%2B4199{}&service=compassion&text=test".format(
-             randint(100, 999))
+             randint(1000000, 9999999))
          self.client.get(url)
  
  
  class SmsSponsor(HttpLocust):
      task_set = SmsSponsorWorkflow
  
Replace phone number and avoid sending SMS for load testing
## Code Before:
from locust import HttpLocust, TaskSet, task
from random import randint


class SmsSponsorWorkflow(TaskSet):

    @task(1)
    def send_sms(self):
        url = "/sms/mnc?sender=%2B41789364{}&service=compassion".format(
            randint(100, 999))
        self.client.get(url)


class SmsSponsor(HttpLocust):
    task_set = SmsSponsorWorkflow

## Instruction:
Replace phone number and avoid sending SMS for load testing
## Code After:
from locust import HttpLocust, TaskSet, task
from random import randint


class SmsSponsorWorkflow(TaskSet):

    @task(1)
    def send_sms(self):
        url = "/sms/mnc?sender=%2B4199{}&service=compassion&text=test".format(
            randint(1000000, 9999999))
        self.client.get(url)


class SmsSponsor(HttpLocust):
    task_set = SmsSponsorWorkflow
