Skip to content

Commit d812e38

Browse files
added weights
1 parent c99fa9b commit d812e38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

edx_sga/tests/integration_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def make_one(self, display_name=None, **kw):
112112
"""
113113
Creates a XBlock SGA for testing purpose.
114114
"""
115+
weight = kw.get('weight', 0)
115116
field_data = DictFieldData(kw)
116117
block = StaffGradedAssignmentXBlock(self.runtime, field_data, self.scope_ids)
117118
block.location = Location(
@@ -126,7 +127,7 @@ def make_one(self, display_name=None, **kw):
126127
block.display_name = display_name
127128

128129
block.start = datetime.datetime(2010, 5, 12, 2, 42, tzinfo=pytz.utc)
129-
block.weight = field_data.get('weight', 0)
130+
block.weight = weight
130131
modulestore().create_item(
131132
self.staff.username, block.location.course_key, block.location.block_type, block.location.block_id
132133
)

0 commit comments

Comments
 (0)