Skip to content

Commit

Permalink
fix: Stop using testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
bmtcril committed Mar 12, 2024
1 parent 4d25b89 commit 0af1611
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ class LoadTest:

def __init__(self, num_users: int, username_prefix: str):
course_shortname = str(uuid.uuid4())[:6]
self.instructor = User.objects.create_user(
f"instructor_{course_shortname}",
self.instructor = self.create_user(

Check warning on line 44 in platform_plugin_aspects/management/commands/load_test_tracking_events.py

View check run for this annotation

Codecov / codecov/patch

platform_plugin_aspects/management/commands/load_test_tracking_events.py#L42-L44

Added lines #L42 - L44 were not covered by tests
username=f"instructor_{course_shortname}",
password="aspects",
email=f"instructor_{course_shortname}@openedx.invalid",
is_active=True
)
self.instructor.is_active = True
self.instructor.save()

Check warning on line 51 in platform_plugin_aspects/management/commands/load_test_tracking_events.py

View check run for this annotation

Codecov / codecov/patch

platform_plugin_aspects/management/commands/load_test_tracking_events.py#L50-L51

Added lines #L50 - L51 were not covered by tests

start_date = datetime.now() - timedelta(days=7)

Check warning on line 53 in platform_plugin_aspects/management/commands/load_test_tracking_events.py

View check run for this annotation

Codecov / codecov/patch

platform_plugin_aspects/management/commands/load_test_tracking_events.py#L53

Added line #L53 was not covered by tests
Expand Down Expand Up @@ -96,7 +97,9 @@ def create_user(self, **user_data):
tos_required=False
)

(user, _, _) = do_create_account(account_creation_form)
user, _, _ = do_create_account(account_creation_form)
user.is_active = True
user.save()
return user

Check warning on line 103 in platform_plugin_aspects/management/commands/load_test_tracking_events.py

View check run for this annotation

Codecov / codecov/patch

platform_plugin_aspects/management/commands/load_test_tracking_events.py#L100-L103

Added lines #L100 - L103 were not covered by tests

def trigger_events(

Check warning on line 105 in platform_plugin_aspects/management/commands/load_test_tracking_events.py

View check run for this annotation

Codecov / codecov/patch

platform_plugin_aspects/management/commands/load_test_tracking_events.py#L105

Added line #L105 was not covered by tests
Expand Down

0 comments on commit 0af1611

Please sign in to comment.