Prepare release 3.1.13 (#5219)
This commit is contained in:
parent
7c00654647
commit
8973f21d15
39
CHANGELOG.md
39
CHANGELOG.md
@ -1,6 +1,45 @@
|
||||
Moto Changelog
|
||||
==============
|
||||
|
||||
3.1.13
|
||||
-----
|
||||
Docker Digest for 3.1.13: <autopopulateddigest>
|
||||
|
||||
New Methods:
|
||||
* EC2:
|
||||
* create_default_vpc()
|
||||
|
||||
* Greengrass:
|
||||
* create_device_definition()
|
||||
* create_device_definition_version()
|
||||
* delete_core_definition()
|
||||
* delete_device_definition()
|
||||
* get_core_definition()
|
||||
* get_core_definition_version()
|
||||
* get_device_definition()
|
||||
* get_device_definition_version()
|
||||
* list_core_definitions()
|
||||
* list_core_definition_versions()
|
||||
* list_device_definitions()
|
||||
* list_device_definition_versions()
|
||||
* update_core_definition()
|
||||
* update_device_definition()
|
||||
|
||||
* SSO Admin:
|
||||
* create_permission_set()
|
||||
* delete_permission_set()
|
||||
* describe_permission_set()
|
||||
* list_permission_sets()
|
||||
* update_permission_set()
|
||||
|
||||
* Route53:
|
||||
* get_dnssec()
|
||||
* get_health_check()
|
||||
|
||||
* Miscellaneous:
|
||||
* StateManager now supports `s3::keyrestore`, managing how long it takes to restore S3 objects from Glacier.
|
||||
|
||||
|
||||
3.1.12
|
||||
-----
|
||||
Docker Digest for 3.1.12: _sha256:64dcfb63b252b3413481683b90f105d01644b6bec150b60e6f612a2569ee630c_
|
||||
|
@ -1219,13 +1219,14 @@
|
||||
|
||||
## dms
|
||||
<details>
|
||||
<summary>9% implemented</summary>
|
||||
<summary>7% implemented</summary>
|
||||
|
||||
- [ ] add_tags_to_resource
|
||||
- [ ] apply_pending_maintenance_action
|
||||
- [ ] cancel_replication_task_assessment_run
|
||||
- [ ] create_endpoint
|
||||
- [ ] create_event_subscription
|
||||
- [ ] create_fleet_advisor_collector
|
||||
- [ ] create_replication_instance
|
||||
- [ ] create_replication_subnet_group
|
||||
- [X] create_replication_task
|
||||
@ -1233,6 +1234,8 @@
|
||||
- [ ] delete_connection
|
||||
- [ ] delete_endpoint
|
||||
- [ ] delete_event_subscription
|
||||
- [ ] delete_fleet_advisor_collector
|
||||
- [ ] delete_fleet_advisor_databases
|
||||
- [ ] delete_replication_instance
|
||||
- [ ] delete_replication_subnet_group
|
||||
- [X] delete_replication_task
|
||||
@ -1247,6 +1250,11 @@
|
||||
- [ ] describe_event_categories
|
||||
- [ ] describe_event_subscriptions
|
||||
- [ ] describe_events
|
||||
- [ ] describe_fleet_advisor_collectors
|
||||
- [ ] describe_fleet_advisor_databases
|
||||
- [ ] describe_fleet_advisor_lsa_analysis
|
||||
- [ ] describe_fleet_advisor_schema_object_summary
|
||||
- [ ] describe_fleet_advisor_schemas
|
||||
- [ ] describe_orderable_replication_instances
|
||||
- [ ] describe_pending_maintenance_actions
|
||||
- [ ] describe_refresh_schemas_status
|
||||
@ -1271,6 +1279,7 @@
|
||||
- [ ] refresh_schemas
|
||||
- [ ] reload_tables
|
||||
- [ ] remove_tags_from_resource
|
||||
- [ ] run_fleet_advisor_lsa_analysis
|
||||
- [X] start_replication_task
|
||||
- [ ] start_replication_task_assessment
|
||||
- [ ] start_replication_task_assessment_run
|
||||
@ -1483,7 +1492,7 @@
|
||||
- [ ] create_client_vpn_route
|
||||
- [X] create_customer_gateway
|
||||
- [ ] create_default_subnet
|
||||
- [ ] create_default_vpc
|
||||
- [X] create_default_vpc
|
||||
- [X] create_dhcp_options
|
||||
- [X] create_egress_only_internet_gateway
|
||||
- [ ] create_fleet
|
||||
@ -2858,7 +2867,7 @@
|
||||
|
||||
## greengrass
|
||||
<details>
|
||||
<summary>2% implemented</summary>
|
||||
<summary>17% implemented</summary>
|
||||
|
||||
- [ ] associate_role_to_group
|
||||
- [ ] associate_service_role_to_account
|
||||
@ -2867,8 +2876,8 @@
|
||||
- [X] create_core_definition
|
||||
- [X] create_core_definition_version
|
||||
- [ ] create_deployment
|
||||
- [ ] create_device_definition
|
||||
- [ ] create_device_definition_version
|
||||
- [X] create_device_definition
|
||||
- [X] create_device_definition_version
|
||||
- [ ] create_function_definition
|
||||
- [ ] create_function_definition_version
|
||||
- [ ] create_group
|
||||
@ -2882,8 +2891,8 @@
|
||||
- [ ] create_subscription_definition
|
||||
- [ ] create_subscription_definition_version
|
||||
- [ ] delete_connector_definition
|
||||
- [ ] delete_core_definition
|
||||
- [ ] delete_device_definition
|
||||
- [X] delete_core_definition
|
||||
- [X] delete_device_definition
|
||||
- [ ] delete_function_definition
|
||||
- [ ] delete_group
|
||||
- [ ] delete_logger_definition
|
||||
@ -2896,11 +2905,11 @@
|
||||
- [ ] get_connectivity_info
|
||||
- [ ] get_connector_definition
|
||||
- [ ] get_connector_definition_version
|
||||
- [ ] get_core_definition
|
||||
- [ ] get_core_definition_version
|
||||
- [X] get_core_definition
|
||||
- [X] get_core_definition_version
|
||||
- [ ] get_deployment_status
|
||||
- [ ] get_device_definition
|
||||
- [ ] get_device_definition_version
|
||||
- [X] get_device_definition
|
||||
- [X] get_device_definition_version
|
||||
- [ ] get_function_definition
|
||||
- [ ] get_function_definition_version
|
||||
- [ ] get_group
|
||||
@ -2919,11 +2928,11 @@
|
||||
- [ ] list_bulk_deployments
|
||||
- [ ] list_connector_definition_versions
|
||||
- [ ] list_connector_definitions
|
||||
- [ ] list_core_definition_versions
|
||||
- [ ] list_core_definitions
|
||||
- [X] list_core_definition_versions
|
||||
- [X] list_core_definitions
|
||||
- [ ] list_deployments
|
||||
- [ ] list_device_definition_versions
|
||||
- [ ] list_device_definitions
|
||||
- [X] list_device_definition_versions
|
||||
- [X] list_device_definitions
|
||||
- [ ] list_function_definition_versions
|
||||
- [ ] list_function_definitions
|
||||
- [ ] list_group_certificate_authorities
|
||||
@ -2943,8 +2952,8 @@
|
||||
- [ ] untag_resource
|
||||
- [ ] update_connectivity_info
|
||||
- [ ] update_connector_definition
|
||||
- [ ] update_core_definition
|
||||
- [ ] update_device_definition
|
||||
- [X] update_core_definition
|
||||
- [X] update_device_definition
|
||||
- [ ] update_function_definition
|
||||
- [ ] update_group
|
||||
- [ ] update_group_certificate_configuration
|
||||
@ -4570,6 +4579,7 @@
|
||||
- [ ] enable_logging
|
||||
- [X] enable_snapshot_copy
|
||||
- [X] get_cluster_credentials
|
||||
- [ ] get_cluster_credentials_with_iam
|
||||
- [ ] get_reserved_node_exchange_configuration_options
|
||||
- [ ] get_reserved_node_exchange_offerings
|
||||
- [ ] modify_aqua_configuration
|
||||
@ -4723,7 +4733,7 @@
|
||||
|
||||
## route53
|
||||
<details>
|
||||
<summary>31% implemented</summary>
|
||||
<summary>34% implemented</summary>
|
||||
|
||||
- [ ] activate_key_signing_key
|
||||
- [ ] associate_vpc_with_hosted_zone
|
||||
@ -4756,9 +4766,9 @@
|
||||
- [ ] get_account_limit
|
||||
- [ ] get_change
|
||||
- [ ] get_checker_ip_ranges
|
||||
- [ ] get_dnssec
|
||||
- [X] get_dnssec
|
||||
- [ ] get_geo_location
|
||||
- [ ] get_health_check
|
||||
- [X] get_health_check
|
||||
- [ ] get_health_check_count
|
||||
- [ ] get_health_check_last_failure_reason
|
||||
- [ ] get_health_check_status
|
||||
@ -5657,7 +5667,7 @@
|
||||
|
||||
## sso-admin
|
||||
<details>
|
||||
<summary>9% implemented</summary>
|
||||
<summary>25% implemented</summary>
|
||||
|
||||
- [ ] attach_managed_policy_to_permission_set
|
||||
- [X] create_account_assignment
|
||||
@ -6059,6 +6069,7 @@
|
||||
- lookoutequipment
|
||||
- lookoutmetrics
|
||||
- lookoutvision
|
||||
- m2
|
||||
- machinelearning
|
||||
- macie
|
||||
- macie2
|
||||
|
@ -57,7 +57,7 @@ Advancement:
|
||||
Call `boto3.client("dax").describe_clusters(..)`.
|
||||
|
||||
Service: S3 (Glacier Restoration)
|
||||
---------------
|
||||
-----------------------------------
|
||||
|
||||
**Model**: `s3::keyrestore` :raw-html:`<br />`
|
||||
Available States:
|
||||
|
@ -1,7 +1,7 @@
|
||||
.. _contributing installation:
|
||||
|
||||
=============================
|
||||
Installation
|
||||
Development Installation
|
||||
=============================
|
||||
|
||||
This is a guide how to install Moto for contributors.
|
||||
|
@ -30,6 +30,7 @@ dms
|
||||
- [ ] cancel_replication_task_assessment_run
|
||||
- [ ] create_endpoint
|
||||
- [ ] create_event_subscription
|
||||
- [ ] create_fleet_advisor_collector
|
||||
- [ ] create_replication_instance
|
||||
- [ ] create_replication_subnet_group
|
||||
- [X] create_replication_task
|
||||
@ -42,6 +43,8 @@ dms
|
||||
- [ ] delete_connection
|
||||
- [ ] delete_endpoint
|
||||
- [ ] delete_event_subscription
|
||||
- [ ] delete_fleet_advisor_collector
|
||||
- [ ] delete_fleet_advisor_databases
|
||||
- [ ] delete_replication_instance
|
||||
- [ ] delete_replication_subnet_group
|
||||
- [X] delete_replication_task
|
||||
@ -56,6 +59,11 @@ dms
|
||||
- [ ] describe_event_categories
|
||||
- [ ] describe_event_subscriptions
|
||||
- [ ] describe_events
|
||||
- [ ] describe_fleet_advisor_collectors
|
||||
- [ ] describe_fleet_advisor_databases
|
||||
- [ ] describe_fleet_advisor_lsa_analysis
|
||||
- [ ] describe_fleet_advisor_schema_object_summary
|
||||
- [ ] describe_fleet_advisor_schemas
|
||||
- [ ] describe_orderable_replication_instances
|
||||
- [ ] describe_pending_maintenance_actions
|
||||
- [ ] describe_refresh_schemas_status
|
||||
@ -84,6 +92,7 @@ dms
|
||||
- [ ] refresh_schemas
|
||||
- [ ] reload_tables
|
||||
- [ ] remove_tags_from_resource
|
||||
- [ ] run_fleet_advisor_lsa_analysis
|
||||
- [X] start_replication_task
|
||||
|
||||
The following parameters have not yet been implemented:
|
||||
|
@ -81,7 +81,7 @@ ec2
|
||||
- [ ] create_client_vpn_route
|
||||
- [X] create_customer_gateway
|
||||
- [ ] create_default_subnet
|
||||
- [ ] create_default_vpc
|
||||
- [X] create_default_vpc
|
||||
- [X] create_dhcp_options
|
||||
- [X] create_egress_only_internet_gateway
|
||||
- [ ] create_fleet
|
||||
|
@ -32,8 +32,8 @@ greengrass
|
||||
- [X] create_core_definition
|
||||
- [X] create_core_definition_version
|
||||
- [ ] create_deployment
|
||||
- [ ] create_device_definition
|
||||
- [ ] create_device_definition_version
|
||||
- [X] create_device_definition
|
||||
- [X] create_device_definition_version
|
||||
- [ ] create_function_definition
|
||||
- [ ] create_function_definition_version
|
||||
- [ ] create_group
|
||||
@ -47,8 +47,8 @@ greengrass
|
||||
- [ ] create_subscription_definition
|
||||
- [ ] create_subscription_definition_version
|
||||
- [ ] delete_connector_definition
|
||||
- [ ] delete_core_definition
|
||||
- [ ] delete_device_definition
|
||||
- [X] delete_core_definition
|
||||
- [X] delete_device_definition
|
||||
- [ ] delete_function_definition
|
||||
- [ ] delete_group
|
||||
- [ ] delete_logger_definition
|
||||
@ -61,11 +61,11 @@ greengrass
|
||||
- [ ] get_connectivity_info
|
||||
- [ ] get_connector_definition
|
||||
- [ ] get_connector_definition_version
|
||||
- [ ] get_core_definition
|
||||
- [ ] get_core_definition_version
|
||||
- [X] get_core_definition
|
||||
- [X] get_core_definition_version
|
||||
- [ ] get_deployment_status
|
||||
- [ ] get_device_definition
|
||||
- [ ] get_device_definition_version
|
||||
- [X] get_device_definition
|
||||
- [X] get_device_definition_version
|
||||
- [ ] get_function_definition
|
||||
- [ ] get_function_definition_version
|
||||
- [ ] get_group
|
||||
@ -84,11 +84,11 @@ greengrass
|
||||
- [ ] list_bulk_deployments
|
||||
- [ ] list_connector_definition_versions
|
||||
- [ ] list_connector_definitions
|
||||
- [ ] list_core_definition_versions
|
||||
- [ ] list_core_definitions
|
||||
- [X] list_core_definition_versions
|
||||
- [X] list_core_definitions
|
||||
- [ ] list_deployments
|
||||
- [ ] list_device_definition_versions
|
||||
- [ ] list_device_definitions
|
||||
- [X] list_device_definition_versions
|
||||
- [X] list_device_definitions
|
||||
- [ ] list_function_definition_versions
|
||||
- [ ] list_function_definitions
|
||||
- [ ] list_group_certificate_authorities
|
||||
@ -108,8 +108,8 @@ greengrass
|
||||
- [ ] untag_resource
|
||||
- [ ] update_connectivity_info
|
||||
- [ ] update_connector_definition
|
||||
- [ ] update_core_definition
|
||||
- [ ] update_device_definition
|
||||
- [X] update_core_definition
|
||||
- [X] update_device_definition
|
||||
- [ ] update_function_definition
|
||||
- [ ] update_group
|
||||
- [ ] update_group_certificate_configuration
|
||||
|
@ -111,6 +111,7 @@ redshift
|
||||
- [ ] enable_logging
|
||||
- [X] enable_snapshot_copy
|
||||
- [X] get_cluster_credentials
|
||||
- [ ] get_cluster_credentials_with_iam
|
||||
- [ ] get_reserved_node_exchange_configuration_options
|
||||
- [ ] get_reserved_node_exchange_offerings
|
||||
- [ ] modify_aqua_configuration
|
||||
|
@ -60,9 +60,9 @@ route53
|
||||
- [ ] get_account_limit
|
||||
- [ ] get_change
|
||||
- [ ] get_checker_ip_ranges
|
||||
- [ ] get_dnssec
|
||||
- [X] get_dnssec
|
||||
- [ ] get_geo_location
|
||||
- [ ] get_health_check
|
||||
- [X] get_health_check
|
||||
- [ ] get_health_check_count
|
||||
- [ ] get_health_check_last_failure_reason
|
||||
- [ ] get_health_check_status
|
||||
|
@ -30,15 +30,15 @@ sso-admin
|
||||
- [ ] attach_managed_policy_to_permission_set
|
||||
- [X] create_account_assignment
|
||||
- [ ] create_instance_access_control_attribute_configuration
|
||||
- [ ] create_permission_set
|
||||
- [X] create_permission_set
|
||||
- [X] delete_account_assignment
|
||||
- [ ] delete_inline_policy_from_permission_set
|
||||
- [ ] delete_instance_access_control_attribute_configuration
|
||||
- [ ] delete_permission_set
|
||||
- [X] delete_permission_set
|
||||
- [ ] describe_account_assignment_creation_status
|
||||
- [ ] describe_account_assignment_deletion_status
|
||||
- [ ] describe_instance_access_control_attribute_configuration
|
||||
- [ ] describe_permission_set
|
||||
- [X] describe_permission_set
|
||||
- [ ] describe_permission_set_provisioning_status
|
||||
- [ ] detach_managed_policy_from_permission_set
|
||||
- [ ] get_inline_policy_for_permission_set
|
||||
@ -53,7 +53,7 @@ sso-admin
|
||||
- [ ] list_instances
|
||||
- [ ] list_managed_policies_in_permission_set
|
||||
- [ ] list_permission_set_provisioning_status
|
||||
- [ ] list_permission_sets
|
||||
- [X] list_permission_sets
|
||||
- [ ] list_permission_sets_provisioned_to_account
|
||||
- [ ] list_tags_for_resource
|
||||
- [ ] provision_permission_set
|
||||
@ -61,5 +61,5 @@ sso-admin
|
||||
- [ ] tag_resource
|
||||
- [ ] untag_resource
|
||||
- [ ] update_instance_access_control_attribute_configuration
|
||||
- [ ] update_permission_set
|
||||
- [X] update_permission_set
|
||||
|
||||
|
@ -20,7 +20,7 @@ url_paths = {
|
||||
r"{0}/(?P<api_version>[\d_-]+)/hostedzonesbyname": Route53().list_hosted_zones_by_name_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/hostedzonesbyvpc": Route53().list_hosted_zones_by_vpc_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/hostedzonecount": Route53().get_hosted_zone_count_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/healthcheck": Route53().health_check_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/healthcheck$": Route53().health_check_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/healthcheck/(?P<health_check_id>[^/]+)$": Route53().get_or_delete_health_check_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/tags/healthcheck/(?P<zone_id>[^/]+)$": tag_response1,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/tags/hostedzone/(?P<zone_id>[^/]+)$": tag_response2,
|
||||
|
@ -31,7 +31,8 @@ def get_moto_implementation(service_name):
|
||||
return None, None
|
||||
backends = list(mock().backends.values())
|
||||
if backends:
|
||||
return backends[0], mock_name
|
||||
backend = backends[0]["us-east-1"] if "us-east-1" in backends[0] else backends[0]["global"]
|
||||
return backend, mock_name
|
||||
|
||||
|
||||
def get_module_name(o):
|
||||
|
@ -65,6 +65,39 @@ def test_delete_hosted_zone():
|
||||
res.should.have.length_of(1)
|
||||
|
||||
|
||||
@mock_route53
|
||||
def test_delete_hosted_zone_with_change_sets():
|
||||
conn = boto3.client("route53", region_name="us-east-1")
|
||||
|
||||
zone_id = conn.create_hosted_zone(
|
||||
Name="testdns.aws.com.", CallerReference=str(hash("foo"))
|
||||
)["HostedZone"]["Id"]
|
||||
|
||||
conn.change_resource_record_sets(
|
||||
HostedZoneId=zone_id,
|
||||
ChangeBatch={
|
||||
"Changes": [
|
||||
{
|
||||
"Action": "CREATE",
|
||||
"ResourceRecordSet": {
|
||||
"Name": "foo.bar.testdns.aws.com",
|
||||
"Type": "A",
|
||||
"ResourceRecords": [{"Value": "1.2.3.4"}],
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
)
|
||||
|
||||
with pytest.raises(ClientError) as exc:
|
||||
conn.delete_hosted_zone(Id=zone_id)
|
||||
err = exc.value.response["Error"]
|
||||
err["Code"].should.equal("HostedZoneNotEmpty")
|
||||
err["Message"].should.equal(
|
||||
"The hosted zone contains resource records that are not SOA or NS records."
|
||||
)
|
||||
|
||||
|
||||
@mock_route53
|
||||
def test_get_hosted_zone_count_no_zones():
|
||||
conn = boto3.client("route53", region_name="us-east-1")
|
||||
|
@ -1,5 +1,7 @@
|
||||
import boto3
|
||||
import pytest
|
||||
import sure # noqa # pylint: disable=unused-import
|
||||
from botocore.exceptions import ClientError
|
||||
from moto import mock_route53
|
||||
|
||||
|
||||
@ -167,3 +169,45 @@ def test_create_calculated_health_check_with_children():
|
||||
config.should.have.key("ChildHealthChecks").being.equal(
|
||||
[child1["HealthCheck"]["Id"], child2["HealthCheck"]["Id"]]
|
||||
)
|
||||
|
||||
|
||||
@mock_route53
|
||||
def test_get_health_check():
|
||||
client = boto3.client("route53", region_name="us-east-1")
|
||||
|
||||
hc_id = client.create_health_check(
|
||||
CallerReference="callref",
|
||||
HealthCheckConfig={
|
||||
"Type": "CALCULATED",
|
||||
"Inverted": False,
|
||||
"Disabled": False,
|
||||
"HealthThreshold": 1,
|
||||
},
|
||||
)["HealthCheck"]["Id"]
|
||||
|
||||
resp = client.get_health_check(HealthCheckId=hc_id)["HealthCheck"]
|
||||
resp.should.have.key("Id").equals(hc_id)
|
||||
resp.should.have.key("CallerReference").equals("callref")
|
||||
resp.should.have.key("HealthCheckVersion").equals(1)
|
||||
|
||||
|
||||
@mock_route53
|
||||
def test_get_unknown_health_check():
|
||||
client = boto3.client("route53", region_name="us-east-1")
|
||||
|
||||
with pytest.raises(ClientError) as exc:
|
||||
client.get_health_check(HealthCheckId="unknown")
|
||||
err = exc.value.response["Error"]
|
||||
err["Code"].should.equal("NoSuchHealthCheck")
|
||||
err["Message"].should.equal("A health check with id unknown does not exist.")
|
||||
|
||||
|
||||
@mock_route53
|
||||
def test_get_dns_sec():
|
||||
client = boto3.client("route53", region_name="us-east-1")
|
||||
|
||||
hosted_zone_id = client.create_hosted_zone(
|
||||
Name="testdns.aws.com.", CallerReference=str(hash("foo"))
|
||||
)["HostedZone"]["Id"]
|
||||
dns_sec = client.get_dnssec(HostedZoneId=hosted_zone_id)
|
||||
dns_sec.should.have.key("Status").equals({"ServeSignature": "NOT_SIGNING"})
|
||||
|
@ -36,7 +36,6 @@ def test_create_reusable_delegation_set_from_hosted_zone():
|
||||
Name="testdns.aws.com.", CallerReference=str(hash("foo"))
|
||||
)
|
||||
hosted_zone_id = response["HostedZone"]["Id"]
|
||||
print(response)
|
||||
hosted_zone_name_servers = set(response["DelegationSet"]["NameServers"])
|
||||
|
||||
resp = client.create_reusable_delegation_set(
|
||||
|
@ -7,6 +7,7 @@ from freezegun import freeze_time
|
||||
import sure # noqa # pylint: disable=unused-import
|
||||
|
||||
from botocore.exceptions import ClientError
|
||||
from unittest import SkipTest
|
||||
import pytest
|
||||
from moto import mock_sns, mock_sqs, settings
|
||||
from moto.core import ACCOUNT_ID
|
||||
@ -398,6 +399,9 @@ def test_publish_to_sqs_in_different_region():
|
||||
@freeze_time("2013-01-01")
|
||||
@mock_sns
|
||||
def test_publish_to_http():
|
||||
if settings.TEST_SERVER_MODE:
|
||||
raise SkipTest("Can't mock requests in ServerMode")
|
||||
|
||||
def callback(request):
|
||||
request.headers["Content-Type"].should.equal("text/plain; charset=UTF-8")
|
||||
json.loads.when.called_with(request.body.decode()).should_not.throw(Exception)
|
||||
@ -418,13 +422,12 @@ def test_publish_to_http():
|
||||
|
||||
conn.publish(TopicArn=topic_arn, Message="my message", Subject="my subject")
|
||||
|
||||
if not settings.TEST_SERVER_MODE:
|
||||
sns_backend = sns_backends["us-east-1"]
|
||||
sns_backend.topics[topic_arn].sent_notifications.should.have.length_of(1)
|
||||
notification = sns_backend.topics[topic_arn].sent_notifications[0]
|
||||
_, msg, subject, _, _ = notification
|
||||
msg.should.equal("my message")
|
||||
subject.should.equal("my subject")
|
||||
sns_backend = sns_backends["us-east-1"]
|
||||
sns_backend.topics[topic_arn].sent_notifications.should.have.length_of(1)
|
||||
notification = sns_backend.topics[topic_arn].sent_notifications[0]
|
||||
_, msg, subject, _, _ = notification
|
||||
msg.should.equal("my message")
|
||||
subject.should.equal("my subject")
|
||||
|
||||
|
||||
@mock_sqs
|
||||
|
Loading…
Reference in New Issue
Block a user