pr fixes
This commit is contained in:
@@ -194,7 +194,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
|
||||
|
||||
# Check that the redirect was to the course info/outline page
|
||||
urls = ('/info', 'course/{}'.format(course_key.to_deprecated_string()))
|
||||
response.url.endswith(urls) # pylint: disable=no-member
|
||||
self.assertTrue(response.url.endswith(urls)) # pylint: disable=no-member
|
||||
|
||||
def test_redirect_to_main(self):
|
||||
# Create user and redirect to 'home' (cms) or 'dashboard' (lms)
|
||||
@@ -206,7 +206,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
|
||||
|
||||
# Check that the redirect was to either /dashboard or /home
|
||||
urls = ('/dashboard', '/home')
|
||||
response.url.endswith(urls) # pylint: disable=no-member
|
||||
self.assertTrue(response.url.endswith(urls)) # pylint: disable=no-member
|
||||
|
||||
def _auto_auth(self, params=None, status_code=None, **kwargs):
|
||||
"""
|
||||
|
||||
@@ -1824,7 +1824,7 @@ def auto_auth(request):
|
||||
if course_id:
|
||||
course_key = CourseLocator.from_string(course_id)
|
||||
role_names = [v.strip() for v in request.GET.get('roles', '').split(',') if v.strip()]
|
||||
redirect_when_done = request.GET.get('redirect', None)
|
||||
redirect_when_done = request.GET.get('redirect', '').lower() == 'true'
|
||||
login_when_done = 'no_login' not in request.GET
|
||||
|
||||
form = AccountCreationForm(
|
||||
@@ -1895,13 +1895,13 @@ def auto_auth(request):
|
||||
# redirect to course info page in LMS
|
||||
redirect_url = reverse(
|
||||
'info',
|
||||
kwargs={'course_id': unicode(course_id)}
|
||||
kwargs={'course_id': course_id}
|
||||
)
|
||||
except NoReverseMatch:
|
||||
# redirect to course outline page in Studio
|
||||
redirect_url = reverse(
|
||||
'course_handler',
|
||||
kwargs={'course_key_string': unicode(course_key)}
|
||||
kwargs={'course_key_string': course_id}
|
||||
)
|
||||
else:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user