Merge branch 'master' into dashboard
This commit is contained in:
commit
abe0460dc7
@ -2,7 +2,7 @@ language: python
|
|||||||
sudo: false
|
sudo: false
|
||||||
python:
|
python:
|
||||||
- 2.7
|
- 2.7
|
||||||
- 3.3
|
- 3.6
|
||||||
env:
|
env:
|
||||||
- TEST_SERVER_MODE=false
|
- TEST_SERVER_MODE=false
|
||||||
- TEST_SERVER_MODE=true
|
- TEST_SERVER_MODE=true
|
||||||
|
@ -62,8 +62,14 @@ class DomainDispatcherApplication(object):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
region = 'us-east-1'
|
region = 'us-east-1'
|
||||||
service = 's3'
|
service = 's3'
|
||||||
host = "{service}.{region}.amazonaws.com".format(
|
if service == 'dynamodb':
|
||||||
service=service, region=region)
|
dynamo_api_version = environ['HTTP_X_AMZ_TARGET'].split("_")[1].split(".")[0]
|
||||||
|
# If Newer API version, use dynamodb2
|
||||||
|
if dynamo_api_version > "20111205":
|
||||||
|
host = "dynamodb2"
|
||||||
|
else:
|
||||||
|
host = "{service}.{region}.amazonaws.com".format(
|
||||||
|
service=service, region=region)
|
||||||
|
|
||||||
with self.lock:
|
with self.lock:
|
||||||
backend = self.get_backend_for_host(host)
|
backend = self.get_backend_for_host(host)
|
||||||
|
@ -51,24 +51,3 @@ def test_publish_to_sqs_in_different_region():
|
|||||||
queue = sqs_conn.get_queue("test-queue")
|
queue = sqs_conn.get_queue("test-queue")
|
||||||
message = queue.read(1)
|
message = queue.read(1)
|
||||||
message.get_body().should.equal('my message')
|
message.get_body().should.equal('my message')
|
||||||
|
|
||||||
|
|
||||||
@freeze_time("2013-01-01")
|
|
||||||
@mock_sns_deprecated
|
|
||||||
def test_publish_to_http():
|
|
||||||
responses.add(
|
|
||||||
method="POST",
|
|
||||||
url="http://example.com/foobar",
|
|
||||||
)
|
|
||||||
|
|
||||||
conn = boto.connect_sns()
|
|
||||||
conn.create_topic("some-topic")
|
|
||||||
topics_json = conn.get_all_topics()
|
|
||||||
topic_arn = topics_json["ListTopicsResponse"][
|
|
||||||
"ListTopicsResult"]["Topics"][0]['TopicArn']
|
|
||||||
|
|
||||||
conn.subscribe(topic_arn, "http", "http://example.com/foobar")
|
|
||||||
|
|
||||||
response = conn.publish(
|
|
||||||
topic=topic_arn, message="my message", subject="my subject")
|
|
||||||
message_id = response['PublishResponse']['PublishResult']['MessageId']
|
|
||||||
|
Loading…
Reference in New Issue
Block a user