Pep8 fixes for factory refactor

This commit is contained in:
Jay Zoldak
2013-03-20 11:31:12 -04:00
parent e45ccbf389
commit 6048bc2832
6 changed files with 53 additions and 54 deletions

View File

@@ -1,4 +1,4 @@
from student.models import (User, UserProfile, Registration,
from student.models import (User, UserProfile, Registration,
CourseEnrollmentAllowed, CourseEnrollment)
from django.contrib.auth.models import Group
from datetime import datetime
@@ -101,10 +101,10 @@ class XModuleCourseFactory(Factory):
new_course.lms.start = gmtime()
new_course.tabs = [{"type": "courseware"},
{"type": "course_info", "name": "Course Info"},
{"type": "discussion", "name": "Discussion"},
{"type": "wiki", "name": "Wiki"},
{"type": "progress", "name": "Progress"}]
{"type": "course_info", "name": "Course Info"},
{"type": "discussion", "name": "Discussion"},
{"type": "wiki", "name": "Wiki"},
{"type": "progress", "name": "Progress"}]
# Update the data in the mongo datastore
store.update_metadata(new_course.location.url(), own_metadata(new_course))
@@ -170,7 +170,7 @@ class XModuleItemFactory(Factory):
# If a display name is set, use that
dest_name = display_name.replace(" ", "_") if display_name is not None else uuid4().hex
dest_location = parent_location._replace(category=template.category,
name=dest_name)
name=dest_name)
new_item = store.clone_item(template, dest_location)

View File

@@ -1,7 +1,7 @@
from student.tests.factories import (UserFactory, UserProfileFactory,
RegistrationFactory, GroupFactory,
CourseEnrollmentAllowed,
CourseFactory, ItemFactory)
RegistrationFactory, GroupFactory,
CourseEnrollmentAllowed,
CourseFactory, ItemFactory)
from lettuce import world
@@ -9,7 +9,7 @@ from lettuce import world
class UserFactory(UserFactory):
"""
User account for lms / cms
"""
"""
pass
@@ -17,7 +17,7 @@ class UserFactory(UserFactory):
class UserProfileFactory(UserProfileFactory):
"""
Demographics etc for the User
"""
"""
pass
@@ -25,7 +25,7 @@ class UserProfileFactory(UserProfileFactory):
class RegistrationFactory(RegistrationFactory):
"""
Activation key for registering the user account
"""
"""
pass
@@ -33,7 +33,7 @@ class RegistrationFactory(RegistrationFactory):
class GroupFactory(GroupFactory):
"""
Groups for user permissions for courses
"""
"""
pass
@@ -41,7 +41,7 @@ class GroupFactory(GroupFactory):
class CourseEnrollmentAllowedFactory(CourseEnrollmentAllowed):
"""
Users allowed to enroll in the course outside of the usual window
"""
"""
pass
@@ -49,13 +49,13 @@ class CourseEnrollmentAllowedFactory(CourseEnrollmentAllowed):
class CourseFactory(CourseFactory):
"""
Courseware courses
"""
"""
pass
@world.absorb
class ItemFactory(ItemFactory):
"""
Everything included inside a course
"""
"""
pass