Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Merge branch 'feature/issue-14-default-to-https' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar committed Jul 31, 2015
2 parents 4bd3a52 + fa9ce5a commit e176815
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions go_http/contacts.py
Expand Up @@ -25,7 +25,7 @@ class ContactsApiClient(object):
:param str api_url:
The full URL of the HTTP API. Defaults to
``http://go.vumi.org/api/v1/go``.
``https://go.vumi.org/api/v1/go``.
:type session:
:class:`requests.Session`
Expand All @@ -36,7 +36,7 @@ class ContactsApiClient(object):
def __init__(self, auth_token, api_url=None, session=None):
self.auth_token = auth_token
if api_url is None:
api_url = "http://go.vumi.org/api/v1/go"
api_url = "https://go.vumi.org/api/v1/go"
self.api_url = api_url.rstrip('/')
if session is None:
session = requests.Session()
Expand Down
4 changes: 2 additions & 2 deletions go_http/metrics.py
Expand Up @@ -22,7 +22,7 @@ class MetricsApiClient(object):
:param str api_url:
The full URL of the HTTP API. Defaults to
``http://go.vumi.org/api/v1/go``.
``https://go.vumi.org/api/v1/go``.
:type session:
:class:`requests.Session`
Expand All @@ -33,7 +33,7 @@ class MetricsApiClient(object):
def __init__(self, auth_token, api_url=None, session=None):
self.auth_token = auth_token
if api_url is None:
api_url = "http://go.vumi.org/api/v1/go"
api_url = "https://go.vumi.org/api/v1/go"
self.api_url = api_url.rstrip('/')
if session is None:
session = requests.Session()
Expand Down
4 changes: 2 additions & 2 deletions go_http/send.py
Expand Up @@ -29,7 +29,7 @@ class HttpApiSender(object):
conversation config.
:param str api_url:
The full URL of the HTTP API. Defaults to
``http://go.vumi.org/api/v1/go/http_api_nostream``.
``https://go.vumi.org/api/v1/go/http_api_nostream``.
:type session:
:class:`requests.Session`
:param session:
Expand All @@ -43,7 +43,7 @@ def __init__(self, account_key, conversation_key, conversation_token,
self.conversation_key = conversation_key
self.conversation_token = conversation_token
if api_url is None:
api_url = "http://go.vumi.org/api/v1/go/http_api_nostream"
api_url = "https://go.vumi.org/api/v1/go/http_api_nostream"
self.api_url = api_url
if session is None:
session = requests.Session()
Expand Down
2 changes: 1 addition & 1 deletion go_http/tests/test_contacts.py
Expand Up @@ -156,7 +156,7 @@ def test_default_session(self):
def test_default_api_url(self):
contacts = ContactsApiClient(self.AUTH_TOKEN)
self.assertEqual(
contacts.api_url, "http://go.vumi.org/api/v1/go")
contacts.api_url, "https://go.vumi.org/api/v1/go")

def test_auth_failure(self):
contacts = self.make_client(auth_token="bogus_token")
Expand Down
2 changes: 1 addition & 1 deletion go_http/tests/test_metrics.py
Expand Up @@ -41,7 +41,7 @@ def test_default_api_url(self):
client = MetricsApiClient(
auth_token="auth-token")
self.assertEqual(client.api_url,
"http://go.vumi.org/api/v1/go")
"https://go.vumi.org/api/v1/go")

def check_request(self, request, method, headers=None):
self.assertEqual(request.method, method)
Expand Down
2 changes: 1 addition & 1 deletion go_http/tests/test_send.py
Expand Up @@ -42,7 +42,7 @@ def test_default_api_url(self):
account_key="acc-key", conversation_key="conv-key",
conversation_token="conv-token")
self.assertEqual(sender.api_url,
"http://go.vumi.org/api/v1/go/http_api_nostream")
"https://go.vumi.org/api/v1/go/http_api_nostream")

def check_request(self, request, method, data=None, headers=None):
self.assertEqual(request.method, method)
Expand Down

0 comments on commit e176815

Please sign in to comment.