Commit e45ccbf3 by Jay Zoldak

Leave CourseEnrollment factor refactoring as a TODO.

parent 16773aac
from student.tests.factories import (UserFactory, UserProfileFactory,
RegistrationFactory, GroupFactory,
CourseEnrollmentAllowed, CourseEnrollment,
CourseEnrollmentAllowed,
CourseFactory, ItemFactory)
from lettuce import world
......@@ -38,14 +38,6 @@ class GroupFactory(GroupFactory):
@world.absorb
class CourseEnrollmentFactory(CourseEnrollment):
"""
Courses that the user is enrolled in
"""
pass
@world.absorb
class CourseEnrollmentAllowedFactory(CourseEnrollmentAllowed):
"""
Users allowed to enroll in the course outside of the usual window
......
......@@ -8,7 +8,6 @@ import factory
from django.contrib.auth.models import User
from student.models import UserProfile, CourseEnrollment
from django_comment_client.models import Role, Permission
from student.tests.factories import UserFactory, CourseEnrollmentFactory
import django_comment_client.models as models
import django_comment_client.utils as utils
......@@ -16,6 +15,21 @@ import django_comment_client.utils as utils
import xmodule.modulestore.django as django
class UserFactory(factory.Factory):
FACTORY_FOR = User
username = 'robot'
password = '123456'
email = 'robot@edx.org'
is_active = True
is_staff = False
class CourseEnrollmentFactory(factory.Factory):
FACTORY_FOR = CourseEnrollment
user = factory.SubFactory(UserFactory)
course_id = 'edX/toy/2012_Fall'
class RoleFactory(factory.Factory):
FACTORY_FOR = Role
name = 'Student'
......
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