Skip to content

Commit

Permalink
Merge pull request #531 from edx/mroytman/modify_add_perm_to_handle_e…
Browse files Browse the repository at this point in the history
…dx_platform

add error handling for KeyError in tests/__init__.py
  • Loading branch information
MichaelRoytman authored Feb 7, 2019
2 parents 0b626d8 + df809dc commit 67699af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion edx_proctoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
from __future__ import absolute_import

# Be sure to update the version number in edx_proctoring/package.json
__version__ = '1.5.9'
__version__ = '1.5.10'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
10 changes: 8 additions & 2 deletions edx_proctoring/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ def setup_test_backends():
def setup_test_perms():
"""
Create missing permissions that would be defined in edx-platform,
or elsewhere
or elsewhere.
edx-platform imports tests from edx-proctoring, which causes duplicate
rules, so ignore the KeyError thrown by the rules package.
"""
rules.add_perm('accounts.can_retire_user', rules.is_staff)
try:
rules.add_perm('accounts.can_retire_user', rules.is_staff)
except KeyError:
pass


setup_test_backends()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@edx/edx-proctoring",
"//": "Be sure to update the version number in edx_proctoring/__init__.py",
"//": "Note that the version format is slightly different than that of the Python version when using prereleases.",
"version": "1.5.9",
"version": "1.5.10",
"main": "edx_proctoring/static/index.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit 67699af

Please sign in to comment.