Commit 32e6d481 by cahrens

pep8/pylint cleanup.

parent f095c5fe
......@@ -36,7 +36,7 @@ def get_course_groupname_for_role(location, role):
def get_users_in_course_group_by_role(location, role):
groupname = get_course_groupname_for_role(location, role)
(group, created) = Group.objects.get_or_create(name=groupname)
(group, _created) = Group.objects.get_or_create(name=groupname)
return group.user_set.all()
......@@ -59,6 +59,7 @@ def create_new_course_group(creator, location, role):
return
def _delete_course_group(location):
"""
This is to be called only by either a command line code path or through a app which has already
......@@ -75,6 +76,7 @@ def _delete_course_group(location):
user.groups.remove(staff)
user.save()
def _copy_course_group(source, dest):
"""
This is to be called only by either a command line code path or through an app which has already
......
......@@ -184,8 +184,8 @@ class GrantInstructorsCreatorAccessTest(TestCase):
"""
Creates a course with one instructor and one staff member.
"""
creator = User.objects.create_user('testcreator'+str(index), 'testcreator+courses@edx.org', 'foo')
staff = User.objects.create_user('teststaff'+str(index), 'teststaff+courses@edx.org', 'foo')
creator = User.objects.create_user('testcreator' + str(index), 'testcreator+courses@edx.org', 'foo')
staff = User.objects.create_user('teststaff' + str(index), 'teststaff+courses@edx.org', 'foo')
location = 'i4x', 'mitX', str(index), 'course', 'test'
create_all_course_groups(creator, location)
add_user_to_course_group(creator, staff, location, STAFF_ROLE_NAME)
......@@ -213,4 +213,3 @@ class GrantInstructorsCreatorAccessTest(TestCase):
self.assertTrue(is_user_in_creator_group(creator2))
self.assertFalse(is_user_in_creator_group(staff1))
self.assertFalse(is_user_in_creator_group(staff2))
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