Exemplo n.º 1
0
    def on_start(self):
        """
        This locust framework defined way of preparing test context
        before task is executed, basic contract is that logic inside of
        on_start(self) method guaranteed to be executed before methods with
        @task annotation called

        :return: None
        """
        self.user = Api.create_fake_user('example-user-%s' % uuid.uuid4())
        if self.user:
            self.room = Api.create_room('Test room', self.user.access_token)
Exemplo n.º 2
0
 def on_start(self):
     self.user = Api.create_fake_user(
         display_name='Test User for Send Message')
     self.room = Api.create_room(title='Hello World',
                                 access_token=self.user.access_token)