Commit f7ccfedb by Jonathan Piacenti

Fix gradebook management command tests

parent ed8a9053
...@@ -54,7 +54,7 @@ class Command(BaseCommand): ...@@ -54,7 +54,7 @@ class Command(BaseCommand):
courses = filtered_courses courses = filtered_courses
for course in courses: for course in courses:
users = CourseEnrollment.users_enrolled_in(course.id) users = CourseEnrollment.objects.users_enrolled_in(course.id)
# If one or more users were specified by the caller, just use those ones... # If one or more users were specified by the caller, just use those ones...
if user_ids is not None: if user_ids is not None:
filtered_users = [] filtered_users = []
......
...@@ -31,9 +31,9 @@ class GenerateGradebookEntriesTests(ModuleStoreTestCase): ...@@ -31,9 +31,9 @@ class GenerateGradebookEntriesTests(ModuleStoreTestCase):
""" """
def setUp(self): def setUp(self):
super(GenerateGradebookEntriesTests, self).setUp()
# Turn off the signalling mechanism temporarily # Turn off the signalling mechanism temporarily
#settings._wrapped.default_settings.FEATURES['SIGNAL_ON_SCORE_CHANGED'] = False settings._wrapped.default_settings.FEATURES['SIGNAL_ON_SCORE_CHANGED'] = False
# Create a couple courses to work with # Create a couple courses to work with
self.course = CourseFactory.create( self.course = CourseFactory.create(
...@@ -95,7 +95,8 @@ class GenerateGradebookEntriesTests(ModuleStoreTestCase): ...@@ -95,7 +95,8 @@ class GenerateGradebookEntriesTests(ModuleStoreTestCase):
) )
# Create some users and enroll them # Create some users and enroll them
self.users = [UserFactory.create(username="testuser" + str(__), profile='test') for __ in xrange(3)] self.users = [UserFactory.create(username="testuser" + str(__), profile='test') for __ in xrange(2)]
self.users.insert(0, self.user)
for user in self.users: for user in self.users:
CourseEnrollmentFactory.create(user=user, course_id=self.course.id) CourseEnrollmentFactory.create(user=user, course_id=self.course.id)
...@@ -136,7 +137,6 @@ class GenerateGradebookEntriesTests(ModuleStoreTestCase): ...@@ -136,7 +137,6 @@ class GenerateGradebookEntriesTests(ModuleStoreTestCase):
mock_request, mock_request,
problem.location, problem.location,
field_data_cache, field_data_cache,
course.id
)._xmodule )._xmodule
@patch.dict(settings.FEATURES, { @patch.dict(settings.FEATURES, {
......
...@@ -47,7 +47,6 @@ class GradebookTests(ModuleStoreTestCase): ...@@ -47,7 +47,6 @@ class GradebookTests(ModuleStoreTestCase):
mock_request, mock_request,
problem.location, problem.location,
field_data_cache, field_data_cache,
course.id
)._xmodule )._xmodule
def setUp(self): def setUp(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment