Skip to content
Snippets Groups Projects
Commit b37b2b94 authored by Jan Pokorný's avatar Jan Pokorný :lifter_tone2:
Browse files

Locust fixes

parent 936a604f
No related branches found
No related tags found
1 merge request!50Locust fixes
......@@ -55,11 +55,11 @@ class StudentActor(HttpUser):
self.course_id = json[0]["id"]
@task
def enrol(self):
def enrol_course(self):
if self.course_id is None or self.id is None:
return
self.client.patch(
url=f'/courses/enrol/{self.course_id}?studentId={self.id}',
url=f'/courses/enrolStudent/{self.course_id}?studentId={self.id}',
auth=None,
headers=self.header,
name="Enrol Courses"
......@@ -80,6 +80,17 @@ class StudentActor(HttpUser):
if len(json) > 0:
self.lecture_id = json[0]["id"]
@task
def enrol_lecture(self):
if self.lecture_id is None or self.id is None:
return
self.client.patch(
url=f'/lectures/enrolStudent/{self.lecture_id}?studentId={self.id}',
auth=None,
headers=self.header,
name="Enrol Lectures"
)
class LecturerActor(HttpUser):
weight = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment