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
cb8818a4
Commit
cb8818a4
authored
Feb 05, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2470 from edx/will/fix-http-stub-test
Increase wait time in XQueue stub test
parents
6d67d0c6
7960d314
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py
+3
-3
No files found.
common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py
View file @
cb8818a4
...
@@ -101,7 +101,7 @@ class StubXQueueServiceTest(unittest.TestCase):
...
@@ -101,7 +101,7 @@ class StubXQueueServiceTest(unittest.TestCase):
)
)
# Wait for the delayed grade response
# Wait for the delayed grade response
self
.
_wait_for_mock_called
(
logger
.
error
,
max_time
=
10
)
self
.
_wait_for_mock_called
(
logger
.
error
)
# Expect that we do NOT receive a response
# Expect that we do NOT receive a response
# and that an error message is logged
# and that an error message is logged
...
@@ -152,7 +152,7 @@ class StubXQueueServiceTest(unittest.TestCase):
...
@@ -152,7 +152,7 @@ class StubXQueueServiceTest(unittest.TestCase):
"""
"""
# Wait for the server to POST back to the callback URL
# Wait for the server to POST back to the callback URL
# If it takes too long, continue anyway
# If it takes too long, continue anyway
self
.
_wait_for_mock_called
(
post_mock
,
max_time
=
10
)
self
.
_wait_for_mock_called
(
post_mock
)
# Check the response posted back to us
# Check the response posted back to us
# This is the default response
# This is the default response
...
@@ -164,7 +164,7 @@ class StubXQueueServiceTest(unittest.TestCase):
...
@@ -164,7 +164,7 @@ class StubXQueueServiceTest(unittest.TestCase):
# Check that the POST request was made with the correct params
# Check that the POST request was made with the correct params
post_mock
.
assert_called_with
(
callback_url
,
data
=
expected_callback_dict
)
post_mock
.
assert_called_with
(
callback_url
,
data
=
expected_callback_dict
)
def
_wait_for_mock_called
(
self
,
mock_obj
,
max_time
=
10
):
def
_wait_for_mock_called
(
self
,
mock_obj
,
max_time
=
1
2
0
):
"""
"""
Wait for `mock` (a `Mock` object) to be called.
Wait for `mock` (a `Mock` object) to be called.
If seconds elapsed exceeds `max_time`, continue without error.
If seconds elapsed exceeds `max_time`, continue without error.
...
...
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