Commit f2b3f913 by David Ormsbee

Merge pull request #9443 from edx/ormsbee/group_access_test_speedups

Use bulk_operations in group access tests.
parents 71e367ea 6b12969e
...@@ -126,15 +126,16 @@ class GroupAccessTestCase(ModuleStoreTestCase): ...@@ -126,15 +126,16 @@ class GroupAccessTestCase(ModuleStoreTestCase):
self.course = CourseFactory.create( self.course = CourseFactory.create(
user_partitions=[self.animal_partition, self.color_partition], user_partitions=[self.animal_partition, self.color_partition],
) )
chapter = ItemFactory.create(category='chapter', parent=self.course) with self.store.bulk_operations(self.course.id, emit_signals=False):
section = ItemFactory.create(category='sequential', parent=chapter) chapter = ItemFactory.create(category='chapter', parent=self.course)
vertical = ItemFactory.create(category='vertical', parent=section) section = ItemFactory.create(category='sequential', parent=chapter)
component = ItemFactory.create(category='problem', parent=vertical) vertical = ItemFactory.create(category='vertical', parent=section)
component = ItemFactory.create(category='problem', parent=vertical)
self.chapter_location = chapter.location
self.section_location = section.location self.chapter_location = chapter.location
self.vertical_location = vertical.location self.section_location = section.location
self.component_location = component.location self.vertical_location = vertical.location
self.component_location = component.location
self.red_cat = UserFactory() # student in red and cat groups self.red_cat = UserFactory() # student in red and cat groups
self.set_user_group(self.red_cat, self.animal_partition, self.cat_group) self.set_user_group(self.red_cat, self.animal_partition, self.cat_group)
......
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