Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2b4a1be6
Commit
2b4a1be6
authored
Dec 11, 2015
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment out mock call to ORA1 stub server
parent
dea671f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py
+0
-13
common/djangoapps/terrain/stubs/xqueue.py
+2
-1
No files found.
common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py
View file @
2b4a1be6
...
@@ -115,19 +115,6 @@ class StubXQueueServiceTest(unittest.TestCase):
...
@@ -115,19 +115,6 @@ class StubXQueueServiceTest(unittest.TestCase):
self
.
assertFalse
(
self
.
post
.
called
)
self
.
assertFalse
(
self
.
post
.
called
)
self
.
assertTrue
(
logger
.
error
.
called
)
self
.
assertTrue
(
logger
.
error
.
called
)
def
test_register_submission_url
(
self
):
# Configure the XQueue stub to notify another service
# when it receives a submission.
register_url
=
'http://127.0.0.1:8000/register_submission'
self
.
server
.
config
[
'register_submission_url'
]
=
register_url
callback_url
=
'http://127.0.0.1:8000/test_callback'
submission
=
json
.
dumps
({
'grader_payload'
:
'test payload'
})
self
.
_post_submission
(
callback_url
,
'test_queuekey'
,
'test_queue'
,
submission
)
# Check that a notification was sent
self
.
post
.
assert_any_call
(
register_url
,
data
=
{
'grader_payload'
:
u'test payload'
})
def
_post_submission
(
self
,
callback_url
,
lms_key
,
queue_name
,
xqueue_body
):
def
_post_submission
(
self
,
callback_url
,
lms_key
,
queue_name
,
xqueue_body
):
"""
"""
Post a submission to the stub XQueue implementation.
Post a submission to the stub XQueue implementation.
...
...
common/djangoapps/terrain/stubs/xqueue.py
View file @
2b4a1be6
...
@@ -39,7 +39,8 @@ class StubXQueueHandler(StubHttpRequestHandler):
...
@@ -39,7 +39,8 @@ class StubXQueueHandler(StubHttpRequestHandler):
if
self
.
_is_grade_request
():
if
self
.
_is_grade_request
():
# If configured, send the grader payload to other services.
# If configured, send the grader payload to other services.
self
.
_register_submission
(
self
.
post_dict
[
'xqueue_body'
])
# TODO TNL-3906
# self._register_submission(self.post_dict['xqueue_body'])
try
:
try
:
xqueue_header
=
json
.
loads
(
self
.
post_dict
[
'xqueue_header'
])
xqueue_header
=
json
.
loads
(
self
.
post_dict
[
'xqueue_header'
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment