Skip to content

Commit

Permalink
Addressed review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave St.Germain committed Dec 11, 2018
1 parent 95e7124 commit c488ce2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 20 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ help: ## display this help message
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'

clean: ## remove generated byte code, coverage reports, and build artifacts
find . -name '*.pyc' -delete
find . -name '*.pyo' -delete
find . -name '*~' -delete
find . -name '*.pyc' -o -name '*.pyo' -o -name '*~' -delete
rm -fr build/ dist/ *.egg-info

upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
Expand Down
4 changes: 2 additions & 2 deletions edx_proctoring/backends/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from webpack_loader.exceptions import BaseWebpackLoaderException, WebpackBundleLookupError

from edx_proctoring.backends.backend import ProctoringBackendProvider
from edx_proctoring.exceptions import BackendProvideCannotRegisterAttempt
from edx_proctoring.exceptions import BackendProviderCannotRegisterAttempt
from edx_proctoring.statuses import ProctoredExamStudentAttemptStatus
from edx_rest_api_client.client import OAuthAPIClient

Expand Down Expand Up @@ -163,7 +163,7 @@ def register_exam_attempt(self, exam, context):
log.debug('Creating exam attempt for %r at %r', exam['external_id'], url)
response = self.session.post(url, json=payload)
if response.status_code != 200:
raise BackendProvideCannotRegisterAttempt(response.content)
raise BackendProviderCannotRegisterAttempt(response.content)
response = response.json()
log.debug(response)
return response['id']
Expand Down
4 changes: 2 additions & 2 deletions edx_proctoring/backends/software_secure.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from edx_proctoring.backends.backend import ProctoringBackendProvider
from edx_proctoring import constants
from edx_proctoring.exceptions import (
BackendProvideCannotRegisterAttempt,
BackendProviderCannotRegisterAttempt,
ProctoredExamSuspiciousLookup,
)
from edx_proctoring.statuses import SoftwareSecureReviewStatus
Expand Down Expand Up @@ -91,7 +91,7 @@ def register_exam_attempt(self, exam, context):
)
)
log.error(err_msg)
raise BackendProvideCannotRegisterAttempt(err_msg)
raise BackendProviderCannotRegisterAttempt(err_msg)

# get the external ID that Software Secure has defined
# for this attempt
Expand Down
4 changes: 2 additions & 2 deletions edx_proctoring/backends/tests/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from django.utils import translation

from edx_proctoring.backends.rest import BaseRestProctoringProvider
from edx_proctoring.exceptions import BackendProvideCannotRegisterAttempt
from edx_proctoring.exceptions import BackendProviderCannotRegisterAttempt


class RESTBackendTests(TestCase):
Expand Down Expand Up @@ -193,7 +193,7 @@ def test_register_exam_attempt_failure(self):
json={'error': 'something'},
status=400
)
with self.assertRaises(BackendProvideCannotRegisterAttempt):
with self.assertRaises(BackendProviderCannotRegisterAttempt):
self.provider.register_exam_attempt(self.backend_exam, context)

@responses.activate
Expand Down
4 changes: 2 additions & 2 deletions edx_proctoring/backends/tests/test_software_secure.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from edx_proctoring.runtime import set_runtime_service

from edx_proctoring.backends import get_backend_provider
from edx_proctoring.exceptions import BackendProvideCannotRegisterAttempt
from edx_proctoring.exceptions import BackendProviderCannotRegisterAttempt
from edx_proctoring import constants

from edx_proctoring.api import (
Expand Down Expand Up @@ -501,7 +501,7 @@ def test_failing_register_attempt(self):

# now try a failing request
with HTTMock(mock_response_error):
with self.assertRaises(BackendProvideCannotRegisterAttempt):
with self.assertRaises(BackendProviderCannotRegisterAttempt):
create_exam_attempt(exam_id, self.user.id, taking_as_proctored=True)

def test_payload_construction(self):
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AllowanceValueNotAllowedException(ProctoredBaseException):
"""


class BackendProvideCannotRegisterAttempt(ProctoredBaseException):
class BackendProviderCannotRegisterAttempt(ProctoredBaseException):
"""
Raised when a back-end provider cannot register an attempt
"""
Expand Down
10 changes: 2 additions & 8 deletions edx_proctoring/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,16 @@ def plugin_settings(settings):
[
'proctoring/js/models/proctored_exam_allowance_model.js',
'proctoring/js/models/proctored_exam_attempt_model.js',
'proctoring/js/models/proctored_exam_model.js'
] +
[
'proctoring/js/models/proctored_exam_model.js',
'proctoring/js/collections/proctored_exam_allowance_collection.js',
'proctoring/js/collections/proctored_exam_attempt_collection.js',
'proctoring/js/collections/proctored_exam_collection.js'
] +
[
'proctoring/js/collections/proctored_exam_collection.js',
'proctoring/js/views/Backbone.ModalDialog.js',
'proctoring/js/views/proctored_exam_add_allowance_view.js',
'proctoring/js/views/proctored_exam_allowance_view.js',
'proctoring/js/views/proctored_exam_attempt_view.js',
'proctoring/js/views/proctored_exam_view.js',
'proctoring/js/views/proctored_exam_instructor_launch.js',
] +
[
'proctoring/js/proctored_app.js',
'proctoring/js/exam_action_handler.js'
]
Expand Down

0 comments on commit c488ce2

Please sign in to comment.