Skip to content

Commit

Permalink
Tightened up the API tests to authenticate properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
eriq-augustine committed Dec 14, 2023
1 parent 3704ef0 commit dbdb0dc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions autograder/api/admin/updatecourse.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
autograder.api.config.PARAM_USER_EMAIL,
autograder.api.config.PARAM_USER_PASS,

autograder.api.config.PARAM_COURSE_SOURCE,
autograder.api.config.APIParam('clear',
'Clear the course database before updating.',
required = False,
Expand Down
4 changes: 4 additions & 0 deletions autograder/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ def get_argument_parser(
'The ID of the course to make this request to.',
config_key = 'course', required = True)

PARAM_COURSE_SOURCE = APIParam('source',
'The source to use for the course.',
required = False)

PARAM_DRY_RUN = APIParam('dry-run',
'Do not commit/finalize the operation,'
+ ' just do all the steps and state what the result would look like.',
Expand Down
2 changes: 1 addition & 1 deletion tests/api/data/test_user_add_mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"email": "[email protected]",
"pass": "cf9e95a6539a1246f7ac270a052dcf077ea1eccf2fd6607c243e795d3289940d",
"pass": "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
"name": "",
"role": "unknown",
"lms-id": ""
Expand Down
2 changes: 1 addition & 1 deletion tests/api/data/test_user_change_pass_self.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"endpoint": "user/change/pass",
"arguments": {
"target-email": "",
"new-pass": "new-pass"
"new-pass": "admin"
},
"output": {
"found-user": true
Expand Down

0 comments on commit dbdb0dc

Please sign in to comment.