Commit c7e10854 by Eric Fischer Committed by Andy Armstrong

Small fixes to rebase to edx-platform

parent 25eef348
...@@ -16,6 +16,7 @@ if __name__ == "__main__": ...@@ -16,6 +16,7 @@ if __name__ == "__main__":
import logging import logging
logging.captureWarnings(True) logging.captureWarnings(True)
sys.argv.append('--noinput') sys.argv.append('--noinput')
sys.argv.append('--logging-clear-handlers')
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv) execute_from_command_line(sys.argv)
...@@ -242,7 +242,7 @@ def create_assessment( ...@@ -242,7 +242,7 @@ def create_assessment(
raise StaffAssessmentInternalError(error_message) raise StaffAssessmentInternalError(error_message)
@transaction.commit_on_success @transaction.atomic
def _complete_assessment( def _complete_assessment(
submission_uuid, submission_uuid,
scorer_id, scorer_id,
......
...@@ -112,8 +112,6 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel): ...@@ -112,8 +112,6 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
@classmethod @classmethod
@transaction.atomic @transaction.atomic
def include_staff_in_class(cls):
if 'staff' not in cls.STEPS:
def start_workflow(cls, submission_uuid, step_names, on_init_params): def start_workflow(cls, submission_uuid, step_names, on_init_params):
""" """
Start a new workflow. Start a new workflow.
......
...@@ -15,7 +15,7 @@ from openassessment.assessment.models import StudentTrainingWorkflow ...@@ -15,7 +15,7 @@ from openassessment.assessment.models import StudentTrainingWorkflow
import submissions.api as sub_api import submissions.api as sub_api
from openassessment.assessment.api import peer as peer_api from openassessment.assessment.api import peer as peer_api
from openassessment.assessment.api import self as self_api from openassessment.assessment.api import self as self_api
from openassessment.workflow.models import AssessmentWorkflow from openassessment.workflow.models import AssessmentWorkflow, AssessmentApiLoadError
from openassessment.workflow.errors import AssessmentWorkflowInternalError from openassessment.workflow.errors import AssessmentWorkflowInternalError
...@@ -368,7 +368,7 @@ class TestAssessmentWorkflowApi(CacheResetTest): ...@@ -368,7 +368,7 @@ class TestAssessmentWorkflowApi(CacheResetTest):
item_id=ITEM_1['item_id'] item_id=ITEM_1['item_id']
) )
with self.assertRaises(AssessmentWorkflowInternalError): with self.assertRaises(AssessmentApiLoadError):
workflow_api.update_from_assessments(submission['uuid'], {}) workflow_api.update_from_assessments(submission['uuid'], {})
def test_cancel_the_assessment_workflow(self): def test_cancel_the_assessment_workflow(self):
......
bok-choy==0.4.7 bok-choy==0.4.7
ddt==0.8.0 ddt==1.0.0
nose==1.3.3 nose==1.3.3
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
cd `dirname $BASH_SOURCE` && cd .. cd `dirname $BASH_SOURCE` && cd ..
echo "Generating HTML fixtures for JavaScript tests..." echo "Generating HTML fixtures for JavaScript tests..."
export DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-"settings.test"} export DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-"settings.test_with_coverage"}
./scripts/render_templates.py openassessment/xblock/static/js/fixtures/templates.json ./scripts/render_templates.py openassessment/xblock/static/js/fixtures/templates.json
...@@ -30,8 +30,8 @@ import dateutil.parser ...@@ -30,8 +30,8 @@ import dateutil.parser
import pytz import pytz
# This is a bit of a hack to ensure that the root repo directory # This is a bit of a hack to ensure that the root repo directory
# is in the Python path, so Django can find the settings module. # is in the front of the Python path, so Django can find the settings module.
sys.path.append(os.path.dirname(os.path.dirname(__file__))) sys.path.insert(1,os.path.dirname(os.path.dirname(__file__)))
import django import django
from django.template.context import Context from django.template.context import Context
from django.template.loader import get_template from django.template.loader import get_template
......
...@@ -6,5 +6,5 @@ cd `dirname $BASH_SOURCE` && cd .. ...@@ -6,5 +6,5 @@ cd `dirname $BASH_SOURCE` && cd ..
git clean -xfd "./storage/test/" git clean -xfd "./storage/test/"
echo "Running Python tests..." echo "Running Python tests..."
export DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-"settings.test"} export DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-"settings.test_with_coverage"}
python manage.py test $1 python manage.py test $1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment