factories.py 731 Bytes
Newer Older
1 2 3 4 5
'''
Factories are defined in other modules and absorbed here into the
lettuce world so that they can be used by both unit tests
and integration / BDD tests.
'''
6 7 8
from lettuce import world

import course_modes.tests.factories as cmf
9
import student.tests.factories as sf
10
import xmodule.modulestore.tests.factories as xf
11

12 13 14
# Unlock XBlock factories, because we're randomizing the collection
# name above to prevent collisions
xf.XMODULE_FACTORY_LOCK.enable()
Calen Pennington committed
15

16 17 18 19 20 21 22 23
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)