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
45f38ddf
Commit
45f38ddf
authored
Sep 06, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update `requests` library to 1.2.3
parent
54343881
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
13 deletions
+13
-13
common/djangoapps/terrain/browser.py
+5
-5
common/lib/capa/capa/xqueue_interface.py
+2
-1
common/lib/sample-post.py
+1
-1
common/lib/xmodule/xmodule/open_ended_grading_classes/grading_service_module.py
+1
-1
docs/shared/requirements.txt
+1
-1
lms/djangoapps/courseware/mock_youtube_server/mock_youtube_server.py
+0
-1
lms/djangoapps/instructor/tests/test_api.py
+2
-1
lms/djangoapps/instructor/views/api.py
+0
-1
requirements/edx/base.txt
+1
-1
No files found.
common/djangoapps/terrain/browser.py
View file @
45f38ddf
...
...
@@ -12,7 +12,7 @@ from django.core.management import call_command
from
django.conf
import
settings
from
selenium.common.exceptions
import
WebDriverException
from
selenium.webdriver.common.desired_capabilities
import
DesiredCapabilities
from
requests
import
put
import
requests
from
base64
import
encodestring
from
json
import
dumps
...
...
@@ -54,12 +54,12 @@ def set_job_status(jobid, passed=True):
"""
Sets the job status on sauce labs
"""
body_content
=
dumps
({
"passed"
:
passed
})
config
=
get_username_and_key
()
url
=
'http://saucelabs.com/rest/v1/{}/jobs/{}'
.
format
(
config
[
'username'
],
world
.
jobid
)
body_content
=
dumps
({
"passed"
:
passed
})
base64string
=
encodestring
(
'{}:{}'
.
format
(
config
[
'username'
],
config
[
'access-key'
]))[:
-
1
]
result
=
put
(
'http://saucelabs.com/rest/v1/{}/jobs/{}'
.
format
(
config
[
'username'
],
world
.
jobid
),
data
=
body_content
,
headers
=
{
"Authorization"
:
"Basic {}"
.
format
(
base64string
)})
headers
=
{
"Authorization"
:
"Basic {}"
.
format
(
base64string
)}
result
=
requests
.
put
(
url
,
data
=
body_content
,
headers
=
headers
)
return
result
.
status_code
==
200
...
...
common/lib/capa/capa/xqueue_interface.py
View file @
45f38ddf
...
...
@@ -64,7 +64,8 @@ class XQueueInterface(object):
def
__init__
(
self
,
url
,
django_auth
,
requests_auth
=
None
):
self
.
url
=
url
self
.
auth
=
django_auth
self
.
session
=
requests
.
session
(
auth
=
requests_auth
)
self
.
session
=
requests
.
Session
()
self
.
session
.
auth
=
requests_auth
def
send_to_queue
(
self
,
header
,
body
,
files_to_upload
=
None
):
"""
...
...
common/lib/sample-post.py
View file @
45f38ddf
...
...
@@ -39,7 +39,7 @@ username = prompt('username on server', 'victor@edx.org')
password
=
prompt
(
'password'
,
'abc123'
,
safe
=
True
)
print
"get csrf cookie"
session
=
requests
.
s
ession
()
session
=
requests
.
S
ession
()
r
=
session
.
get
(
server
+
'/'
)
r
.
raise_for_status
()
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/grading_service_module.py
View file @
45f38ddf
...
...
@@ -25,7 +25,7 @@ class GradingService(object):
def
__init__
(
self
,
config
):
self
.
username
=
config
[
'username'
]
self
.
password
=
config
[
'password'
]
self
.
session
=
requests
.
s
ession
()
self
.
session
=
requests
.
S
ession
()
self
.
system
=
config
[
'system'
]
def
_login
(
self
):
...
...
docs/shared/requirements.txt
View file @
45f38ddf
...
...
@@ -48,7 +48,7 @@ python-memcached==1.48
python-openid==2.2.5
pytz==2012h
PyYAML==3.10
requests==
0.14.2
requests==
1.2.3
Shapely==1.2.16
sorl-thumbnail==11.12
South==0.7.6
...
...
lms/djangoapps/courseware/mock_youtube_server/mock_youtube_server.py
View file @
45f38ddf
from
BaseHTTPServer
import
HTTPServer
,
BaseHTTPRequestHandler
import
urlparse
from
requests.packages.oauthlib.oauth1.rfc5849
import
signature
import
mock
import
threading
import
json
...
...
lms/djangoapps/instructor/tests/test_api.py
View file @
45f38ddf
...
...
@@ -4,6 +4,7 @@ Unit tests for instructor.api methods.
# pylint: disable=E1111
import
unittest
import
json
import
requests
from
urllib
import
quote
from
django.conf
import
settings
from
django.test
import
TestCase
...
...
@@ -756,7 +757,7 @@ class TestInstructorAPIAnalyticsProxy(ModuleStoreTestCase, LoginEnrollmentTestCa
class
FakeProxyResponse
(
object
):
""" Fake successful requests response object. """
def
__init__
(
self
):
self
.
status_code
=
instructor
.
views
.
api
.
codes
.
OK
self
.
status_code
=
requests
.
status_codes
.
codes
.
OK
self
.
content
=
'{"test_content": "robot test content"}'
class
FakeBadProxyResponse
(
object
):
...
...
lms/djangoapps/instructor/views/api.py
View file @
45f38ddf
...
...
@@ -9,7 +9,6 @@ Many of these GETs may become PUTs in the future.
import
re
import
logging
import
requests
from
requests.status_codes
import
codes
from
collections
import
OrderedDict
from
django.conf
import
settings
from
django_future.csrf
import
ensure_csrf_cookie
...
...
requirements/edx/base.txt
View file @
45f38ddf
...
...
@@ -53,7 +53,7 @@ python-memcached==1.48
python-openid==2.2.5
pytz==2012h
PyYAML==3.10
requests==
0.14.2
requests==
1.2.3
scipy==0.11.0
Shapely==1.2.16
sorl-thumbnail==11.12
...
...
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