from locust import between, HttpUser, task


class WebsiteTestUser(HttpUser):
    wait_time = between(0.5, 3.0)

    def on_start(self):
        """ on_start is called when a Locust start before any task is scheduled """
        pass

    def on_stop(self):
        """ on_stop is called when the TaskSet is stopping """
        pass

    @task(1)
    def index(self):
        self.client.get(
                "/read/author/1",
                headers = {"Authorization": "Bearer aaa"},
                )

from locust import between, HttpUser, task


class WebsiteTestUser(HttpUser):
    wait_time = between(0.5, 3.0)

    def on_start(self):
        """ on_start is called when a Locust start before any task is scheduled """
        pass

    def on_stop(self):
        """ on_stop is called when the TaskSet is stopping """
        pass

    @task(1)
    def index(self):
        self.client.get(
                "/read/author/1",
                headers = {"Authorization": "Bearer aaa"},
                )

on_start is called when a Locust start before any task is scheduled on_stop is called when the TaskSet is stopping