Grader unit tests (partial)

This commit is contained in:
Don Mitchell
2012-12-26 15:48:37 -05:00
parent 8d9a221945
commit 83bc9d7bf8
3 changed files with 69 additions and 50 deletions

View File

@@ -237,7 +237,7 @@ class CourseGradingModel:
# 5 hours 59 minutes 59 seconds => converted to iso format
rawgrace = descriptor.metadata.get('graceperiod', None)
if rawgrace:
parsedgrace = {str(key): val for (val, key) in re.findall('\s*(\d*)\s*(\w*)', rawgrace)}
parsedgrace = {str(key): val for (val, key) in re.findall('\s*(\d+)\s*(\w+)', rawgrace)}
return parsedgrace
else: return None