Skip to content
Snippets Groups Projects
Commit 0cac6ea2 authored by Will Daly's avatar Will Daly
Browse files

Fix pylint violations

parent 7f54af3b
No related merge requests found
......@@ -59,7 +59,7 @@ class EnrollmentTest(ModuleStoreTestCase):
# Professional ed
# Expect that we're sent to the "choose your track" page
# (which will, in turn, redirect us to a page where we can verify/pay)
# We should NOT be auto-enrolled, because that would be giving
# We should NOT be auto-enrolled, because that would be giving
# away an expensive course for free :)
(['professional'], 'course_modes_choose', None),
)
......@@ -110,9 +110,9 @@ class EnrollmentTest(ModuleStoreTestCase):
self.client.logout()
self.client.get(reverse('register_user'), {'course_id': self.course.id})
self.client.login(username=self.USERNAME, password=self.PASSWORD)
self.dummy_request = RequestFactory().request()
self.dummy_request.session = self.client.session
strategy = DjangoStrategy(RequestFactory, request=self.dummy_request)
dummy_request = RequestFactory().request()
dummy_request.session = self.client.session
strategy = DjangoStrategy(RequestFactory, request=dummy_request)
change_enrollment_third_party(is_register=True, strategy=strategy, user=self.user)
self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course.id))
......@@ -128,9 +128,9 @@ class EnrollmentTest(ModuleStoreTestCase):
self.client.get(reverse('register_user'), {'course_id': self.course.id})
self.client.login(username=self.USERNAME, password=self.PASSWORD)
self.dummy_request = RequestFactory().request()
self.dummy_request.session = self.client.session
strategy = DjangoStrategy(RequestFactory, request=self.dummy_request)
dummy_request = RequestFactory().request()
dummy_request.session = self.client.session
strategy = DjangoStrategy(RequestFactory, request=dummy_request)
change_enrollment_third_party(is_register=True, strategy=strategy, user=self.user)
# Verify that the user has not been enrolled in the course
......
......@@ -408,7 +408,7 @@ def login_analytics(*args, **kwargs):
},
context={
'Google Analytics': {
'clientId': tracking_context.get('client_id')
'clientId': tracking_context.get('client_id')
}
}
)
......@@ -430,5 +430,5 @@ def change_enrollment(*args, **kwargs):
CourseEnrollment.enroll(kwargs['user'], course_id)
except CourseEnrollmentException:
pass
except Exception, e:
logger.exception(e)
except Exception as ex:
logger.exception(ex)
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