-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uses transforms fixture test utilities from ERB to ensure that raw aggregator events are transformed to xAPI as expected. * test_output/ -- used by ERB to write failed event transforms for debugging * adds 'factory' as a test requirement because ERB tests needs it.
- Loading branch information
1 parent
e82c49d
commit 4542458
Showing
26 changed files
with
739 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ pip-log.txt | |
.tox | ||
coverage.xml | ||
htmlcov/ | ||
test_output/*.json | ||
|
||
# Translations | ||
*.mo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Output dir for failed transformer tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
tests/fixtures/expected/openedx.completion_aggregator.completion.chapter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"actor": { | ||
"objectType": "Agent", | ||
"account": { | ||
"name": "32e08e30-f8ae-4ce2-94a8-c2bfe38a70cb", | ||
"homePage": "http://localhost:18000" | ||
} | ||
}, | ||
"id":"484fe8d7-7a5b-52ff-a0ab-3d3d8c1a8b27", | ||
"object":{ | ||
"id":"http://localhost:18000/xblock/block-v1:edX+DemoX+Demo_Course+type@chapter+block@b443e0d6bc4d43c1bed991dbd8a10d42", | ||
"definition":{ | ||
"type":"http://adlnet.gov/expapi/activities/module" | ||
}, | ||
"objectType":"Activity" | ||
}, | ||
"verb":{ | ||
"id":"http://adlnet.gov/expapi/verbs/completed", | ||
"display":{ | ||
"en":"completed" | ||
} | ||
}, | ||
"version":"1.0.3", | ||
"context":{ | ||
"contextActivities":{ | ||
"parent":[ | ||
{ | ||
"id":"http://localhost:18000/course/course-v1:edX+DemoX+Demo_Course", | ||
"objectType":"Activity", | ||
"definition":{ | ||
"name":{ | ||
"en-US":"Demonstration Course" | ||
}, | ||
"type":"http://adlnet.gov/expapi/activities/course" | ||
} | ||
} | ||
] | ||
}, | ||
"extensions":{ | ||
"https://w3id.org/xapi/openedx/extension/transformer-version":"[email protected]", | ||
"https://w3id.org/xapi/openedx/extensions/session-id":"056aca2a1c6b76742b283e73d3424453" | ||
} | ||
}, | ||
"timestamp":"2023-12-05T21:34:52.909063+00:00" | ||
} |
45 changes: 45 additions & 0 deletions
45
tests/fixtures/expected/openedx.completion_aggregator.completion.course.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"actor": { | ||
"objectType": "Agent", | ||
"account": { | ||
"name": "32e08e30-f8ae-4ce2-94a8-c2bfe38a70cb", | ||
"homePage": "http://localhost:18000" | ||
} | ||
}, | ||
"id":"484fe8d7-7a5b-52ff-a0ab-3d3d8c1a8b27", | ||
"object":{ | ||
"id":"http://localhost:18000/xblock/block-v1:edX+DemoX+Demo_Course+type@course+block@course", | ||
"definition":{ | ||
"type":"http://adlnet.gov/expapi/activities/course" | ||
}, | ||
"objectType":"Activity" | ||
}, | ||
"verb":{ | ||
"id":"http://adlnet.gov/expapi/verbs/completed", | ||
"display":{ | ||
"en":"completed" | ||
} | ||
}, | ||
"version":"1.0.3", | ||
"context":{ | ||
"contextActivities":{ | ||
"parent":[ | ||
{ | ||
"id":"http://localhost:18000/course/course-v1:edX+DemoX+Demo_Course", | ||
"objectType":"Activity", | ||
"definition":{ | ||
"name":{ | ||
"en-US":"Demonstration Course" | ||
}, | ||
"type":"http://adlnet.gov/expapi/activities/course" | ||
} | ||
} | ||
] | ||
}, | ||
"extensions":{ | ||
"https://w3id.org/xapi/openedx/extension/transformer-version":"[email protected]", | ||
"https://w3id.org/xapi/openedx/extensions/session-id":"056aca2a1c6b76742b283e73d3424453" | ||
} | ||
}, | ||
"timestamp":"2023-12-05T21:34:52.909063+00:00" | ||
} |
45 changes: 45 additions & 0 deletions
45
tests/fixtures/expected/openedx.completion_aggregator.completion.sequential.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"actor": { | ||
"objectType": "Agent", | ||
"account": { | ||
"name": "32e08e30-f8ae-4ce2-94a8-c2bfe38a70cb", | ||
"homePage": "http://localhost:18000" | ||
} | ||
}, | ||
"id":"484fe8d7-7a5b-52ff-a0ab-3d3d8c1a8b27", | ||
"object":{ | ||
"id":"http://localhost:18000/xblock/block-v1:edX+DemoX+Demo_Course+type@sequential+block@bf1eac10ebb649e3aaf9cc07325f8e04", | ||
"definition":{ | ||
"type":"http://adlnet.gov/expapi/activities/module" | ||
}, | ||
"objectType":"Activity" | ||
}, | ||
"verb":{ | ||
"id":"http://adlnet.gov/expapi/verbs/completed", | ||
"display":{ | ||
"en":"completed" | ||
} | ||
}, | ||
"version":"1.0.3", | ||
"context":{ | ||
"contextActivities":{ | ||
"parent":[ | ||
{ | ||
"id":"http://localhost:18000/course/course-v1:edX+DemoX+Demo_Course", | ||
"objectType":"Activity", | ||
"definition":{ | ||
"name":{ | ||
"en-US":"Demonstration Course" | ||
}, | ||
"type":"http://adlnet.gov/expapi/activities/course" | ||
} | ||
} | ||
] | ||
}, | ||
"extensions":{ | ||
"https://w3id.org/xapi/openedx/extension/transformer-version":"[email protected]", | ||
"https://w3id.org/xapi/openedx/extensions/session-id":"056aca2a1c6b76742b283e73d3424453" | ||
} | ||
}, | ||
"timestamp":"2023-12-05T21:34:52.909063+00:00" | ||
} |
45 changes: 45 additions & 0 deletions
45
tests/fixtures/expected/openedx.completion_aggregator.completion.vertical.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"actor": { | ||
"objectType": "Agent", | ||
"account": { | ||
"name": "32e08e30-f8ae-4ce2-94a8-c2bfe38a70cb", | ||
"homePage": "http://localhost:18000" | ||
} | ||
}, | ||
"id":"484fe8d7-7a5b-52ff-a0ab-3d3d8c1a8b27", | ||
"object":{ | ||
"id":"http://localhost:18000/xblock/block-v1:edX+DemoX+Demo_Course+type@vertical+block@e1fabd9fa55f441caa75580f258ffbc3", | ||
"definition":{ | ||
"type":"http://adlnet.gov/expapi/activities/module" | ||
}, | ||
"objectType":"Activity" | ||
}, | ||
"verb":{ | ||
"id":"http://adlnet.gov/expapi/verbs/completed", | ||
"display":{ | ||
"en":"completed" | ||
} | ||
}, | ||
"version":"1.0.3", | ||
"context":{ | ||
"contextActivities":{ | ||
"parent":[ | ||
{ | ||
"id":"http://localhost:18000/course/course-v1:edX+DemoX+Demo_Course", | ||
"objectType":"Activity", | ||
"definition":{ | ||
"name":{ | ||
"en-US":"Demonstration Course" | ||
}, | ||
"type":"http://adlnet.gov/expapi/activities/course" | ||
} | ||
} | ||
] | ||
}, | ||
"extensions":{ | ||
"https://w3id.org/xapi/openedx/extension/transformer-version":"[email protected]", | ||
"https://w3id.org/xapi/openedx/extensions/session-id":"056aca2a1c6b76742b283e73d3424453" | ||
} | ||
}, | ||
"timestamp":"2023-12-05T21:34:52.909063+00:00" | ||
} |
51 changes: 51 additions & 0 deletions
51
tests/fixtures/expected/openedx.completion_aggregator.progress.chapter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"actor": { | ||
"objectType": "Agent", | ||
"account": { | ||
"name": "32e08e30-f8ae-4ce2-94a8-c2bfe38a70cb", | ||
"homePage": "http://localhost:18000" | ||
} | ||
}, | ||
"id":"146d5372-1d64-54b1-8c60-b4acaad3c976", | ||
"object":{ | ||
"id":"http://localhost:18000/xblock/block-v1:edX+DemoX+Demo_Course+type@chapter+block@b443e0d6bc4d43c1bed991dbd8a10d42", | ||
"definition":{ | ||
"type":"http://adlnet.gov/expapi/activities/module" | ||
}, | ||
"objectType":"Activity" | ||
}, | ||
"verb":{ | ||
"id":"http://adlnet.gov/expapi/verbs/progressed", | ||
"display":{ | ||
"en":"progressed" | ||
} | ||
}, | ||
"version":"1.0.3", | ||
"context":{ | ||
"contextActivities":{ | ||
"parent":[ | ||
{ | ||
"id":"http://localhost:18000/course/course-v1:edX+DemoX+Demo_Course", | ||
"objectType":"Activity", | ||
"definition":{ | ||
"name":{ | ||
"en-US":"Demonstration Course" | ||
}, | ||
"type":"http://adlnet.gov/expapi/activities/course" | ||
} | ||
} | ||
] | ||
}, | ||
"extensions":{ | ||
"https://w3id.org/xapi/openedx/extension/transformer-version":"[email protected]", | ||
"https://w3id.org/xapi/openedx/extensions/session-id":"056aca2a1c6b76742b283e73d3424453" | ||
} | ||
}, | ||
"result":{ | ||
"score":{ | ||
"scaled":0.5 | ||
}, | ||
"completion":false | ||
}, | ||
"timestamp":"2023-12-05T21:34:52.909063+00:00" | ||
} |
Oops, something went wrong.