Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
77942cec
Commit
77942cec
authored
11 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Don't create more factory subclasses, just absorb the classes directly
parent
7e91ba63
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/terrain/factories.py
+8
-65
8 additions, 65 deletions
common/djangoapps/terrain/factories.py
with
8 additions
and
65 deletions
common/djangoapps/terrain/factories.py
+
8
−
65
View file @
77942cec
...
...
@@ -9,68 +9,11 @@ import course_modes.tests.factories as cmf
from
lettuce
import
world
@world.absorb
class
UserFactory
(
sf
.
UserFactory
):
"""
User account for lms / cms
"""
FACTORY_DJANGO_GET_OR_CREATE
=
(
'
username
'
,)
pass
@world.absorb
class
UserProfileFactory
(
sf
.
UserProfileFactory
):
"""
Demographics etc for the User
"""
FACTORY_DJANGO_GET_OR_CREATE
=
(
'
user
'
,)
pass
@world.absorb
class
RegistrationFactory
(
sf
.
RegistrationFactory
):
"""
Activation key for registering the user account
"""
FACTORY_DJANGO_GET_OR_CREATE
=
(
'
user
'
,)
pass
@world.absorb
class
GroupFactory
(
sf
.
GroupFactory
):
"""
Groups for user permissions for courses
"""
pass
@world.absorb
class
CourseEnrollmentAllowedFactory
(
sf
.
CourseEnrollmentAllowedFactory
):
"""
Users allowed to enroll in the course outside of the usual window
"""
pass
@world.absorb
class
CourseModeFactory
(
cmf
.
CourseModeFactory
):
"""
Course modes
"""
pass
@world.absorb
class
CourseFactory
(
xf
.
CourseFactory
):
"""
Courseware courses
"""
pass
@world.absorb
class
ItemFactory
(
xf
.
ItemFactory
):
"""
Everything included inside a course
"""
pass
world
.
absorb
(
sf
.
UserFactory
)
world
.
absorb
(
sf
.
UserProfileFactory
)
world
.
absorb
(
sf
.
RegistrationFactory
)
world
.
absorb
(
sf
.
GroupFactory
)
world
.
absorb
(
sf
.
CourseEnrollmentAllowedFactory
)
world
.
absorb
(
cmf
.
CourseModeFactory
)
world
.
absorb
(
xf
.
CourseFactory
)
world
.
absorb
(
xf
.
ItemFactory
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment