More factory refactoring.

This commit is contained in:
Jay Zoldak
2013-03-19 17:09:57 -04:00
parent 3576a3154b
commit 16773aac63
2 changed files with 3 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ class GroupFactory(GroupFactory):
@world.absorb
class CourseEnrollment(CourseEnrollment):
class CourseEnrollmentFactory(CourseEnrollment):
"""
Courses that the user is enrolled in
"""
@@ -46,7 +46,7 @@ class CourseEnrollment(CourseEnrollment):
@world.absorb
class CourseEnrollmentAllowed(CourseEnrollmentAllowed):
class CourseEnrollmentAllowedFactory(CourseEnrollmentAllowed):
"""
Users allowed to enroll in the course outside of the usual window
"""

View File

@@ -1,8 +1,6 @@
from lettuce import world, step
from django.core.management import call_command
from nose.tools import assert_equals, assert_in
from lettuce.django import django_url
from django.conf import settings
from django.contrib.auth.models import User
from student.models import CourseEnrollment
from xmodule.modulestore import Location
@@ -123,6 +121,7 @@ def i_am_registered_for_the_course(step, course):
u = User.objects.get(username='robot')
# If the user is not already enrolled, enroll the user.
# TODO: change to factory
CourseEnrollment.objects.get_or_create(user=u, course_id=course_id(course))
world.log_in('robot@edx.org', 'test')