feat: TNL-10136 fix build errors

blank lines in __init__
private method that needed to be public
importlib and importlib-resources dependencies
This commit is contained in:
Bernard Szabo
2022-11-25 08:15:49 -05:00
committed by bszabo
parent 377edc2f4d
commit 89086d482a
6 changed files with 18 additions and 64775 deletions

View File

@@ -3,4 +3,3 @@ Student models migrated to folder to tease out the course enrollment aspects fro
'''
from .course_enrollment import *
from .user import *

View File

@@ -295,7 +295,7 @@ def get_retired_email_by_email(email):
return user_util.get_retired_email(email, settings.RETIRED_USER_SALTS, settings.RETIRED_EMAIL_FMT)
def _get_all_retired_usernames_by_username(username):
def get_all_retired_usernames_by_username(username):
"""
Returns a generator of "retired usernames", one hashed with each
configured salt. Used for finding out if the given username has
@@ -319,7 +319,7 @@ def get_potentially_retired_user_by_username(username):
does not exist, then any hashed username salted with the historical
salts.
"""
locally_hashed_usernames = list(_get_all_retired_usernames_by_username(username))
locally_hashed_usernames = list(get_all_retired_usernames_by_username(username))
locally_hashed_usernames.append(username)
potential_users = User.objects.filter(username__in=locally_hashed_usernames)
@@ -364,7 +364,7 @@ def get_potentially_retired_user_by_username_and_hash(username, hashed_username)
does not exist, the any hashed username salted with the historical
salts.
"""
locally_hashed_usernames = list(_get_all_retired_usernames_by_username(username))
locally_hashed_usernames = list(get_all_retired_usernames_by_username(username))
if hashed_username not in locally_hashed_usernames:
raise Exception('Mismatched hashed_username, bad salt?')

View File

@@ -15,6 +15,7 @@ from django.urls import reverse
from openedx.core.djangolib.testing.utils import skip_unless_lms
from common.djangoapps.student.models import (
get_all_retired_usernames_by_username,
get_potentially_retired_user_by_username,
get_potentially_retired_user_by_username_and_hash,
get_retired_email_by_email,