Skip to content

Instantly share code, notes, and snippets.

@vegitron
Created February 27, 2015 00:38
Show Gist options
  • Save vegitron/014e63c89a6418f970e2 to your computer and use it in GitHub Desktop.
Save vegitron/014e63c89a6418f970e2 to your computer and use it in GitHub Desktop.
Canvas error in myuw tests
(myuw)pmichaud@anise:~/django/myuw$ python manage.py test myuw_mobile.test.dao.canvas.TestCanvas
Creating test database for alias 'default'...
EE
======================================================================
ERROR: test_crosslinks (myuw_mobile.test.dao.canvas.TestCanvas)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pmichaud/django/myuw/myuw_mobile/test/dao/canvas.py", line 13, in test_crosslinks
data = get_indexed_data_for_regid("12345678901234567890123456789012")
File "/home/pmichaud/django/myuw/myuw_mobile/dao/canvas.py", line 41, in get_indexed_data_for_regid
'as_user': CanvasEnrollments().sis_user_id(regid)})
File "/home/pmichaud/django/myuw/src/restclients/restclients/canvas/enrollments.py", line 73, in get_enrollments_for_regid
enrollment = self._enrollment_from_json(datum)
File "/home/pmichaud/django/myuw/src/restclients/restclients/canvas/enrollments.py", line 103, in _enrollment_from_json
enrollment.total_activity_time = data["total_activity_time"]
KeyError: 'total_activity_time'
======================================================================
ERROR: test_crosslinks_lookup (myuw_mobile.test.dao.canvas.TestCanvas)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pmichaud/django/myuw/myuw_mobile/test/dao/canvas.py", line 28, in test_crosslinks_lookup
data = get_indexed_data_for_regid("12345678901234567890123456789012")
File "/home/pmichaud/django/myuw/myuw_mobile/dao/canvas.py", line 41, in get_indexed_data_for_regid
'as_user': CanvasEnrollments().sis_user_id(regid)})
File "/home/pmichaud/django/myuw/src/restclients/restclients/canvas/enrollments.py", line 73, in get_enrollments_for_regid
enrollment = self._enrollment_from_json(datum)
File "/home/pmichaud/django/myuw/src/restclients/restclients/canvas/enrollments.py", line 103, in _enrollment_from_json
enrollment.total_activity_time = data["total_activity_time"]
KeyError: 'total_activity_time'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment