Commit Graph

58 Commits

Author SHA1 Message Date
Berislav Kovacki
7e863b0260 Add attributes parameter support for sns create_topic API 2019-02-21 22:08:46 +01:00
Michael Bell
51db19067c Allow attributes to be set with subscribe command (#1705) 2018-07-13 10:21:33 +01:00
Iain Bullard
cd4dd3cfbf SNS - Enforce 'Message too long' exception when publishing messages 2018-06-04 13:38:58 +00:00
hsuhans
d9a4501d24 Change SNS http header to actual setting 2018-06-02 06:18:27 +08:00
Steve Pulec
b6909ff64c
Merge pull request #1654 from Birne94/sns-raw-message-delivery
Add RawMessageDelivery for SNS subscriptions (fixes #1571)
2018-05-30 09:46:59 -04:00
Daniel Birnstiel
222cb1535c Add RawMessageDelivery for SNS subscriptions (fixes #1571) 2018-05-30 09:30:18 +02:00
Ben Jolitz
45b529fef4 parameterize topic name create/delete 2018-05-04 19:17:56 -07:00
wblackconv
ba2ea8e1b3 Add tests for message attribute validation in SNS (#1582)
* Add tests for message attribute validation in SNS

Fixes up bug in return value of
moto.sns.responses.SNSResponse._parse_message_attributes due to
accidental recycling of a variable.

* Fix test_sns.test_publish_to_http in py36 env

Http response is encoded as a byte string which json.loads can't handle.
2018-04-27 15:10:30 -07:00
wblack
0b36f06df1 Fixes for linter warnings 2018-04-18 13:42:36 +00:00
wblack
f401c60825 Include SNS message attributes with message body when delivering to SQS. 2018-04-18 13:42:36 +00:00
Steve Pulec
cd1c6d3e6c Unvendor responses, move back to upstream. 2018-04-05 16:57:43 -04:00
Iain Bullard
d3d9557d49 Implement basic SNS message filtering (#1521)
* Add support for FilterPolicy to sns subscription set_filter_attributes

* Add basic support for sns message filtering

This adds support for exact string value matching along with AND/OR
logic as described here:

https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html

It does not provide support for:
- Anything-but string matching
- Prefix string matching
- Numeric Value Matching

The above filter policies (if configured) will not match messages.
2018-03-21 08:49:11 -07:00
Boris Gvozdev
633decc6c0 SNS: do not duplicate subscriptions 2018-01-02 11:30:39 +11:00
Alexander Mohr
9d087b0729 add subject support (#1387) 2017-12-10 21:59:04 +00:00
Adam Gilman
2ad0f2fc1c SNS create_topic should only accept valid characters (#1329)
* SNS create_topic should only accept valid characters

Closes #1328

* Fix flake8 errors

* Updated regex to match full TopicName constraints

Fixed test_server as it contained invalid TopicNames’ per constraints

* fix error message for invalid topic name
2017-11-13 18:27:11 +00:00
Adam Gilman
307ef8ead1 Makes Creating SNS topics idempotent (#1324)
Make creating SNS topics idempotent

Closes #1323
2017-11-06 19:06:55 +00:00
Terry Cain
dce81cf875 Fixed typos ;-)
Thanks @hwine
2017-10-20 14:52:24 +01:00
Terry Cain
bca8e11290 Fixes #1276 SNS Subject validation 2017-10-20 13:19:55 +01:00
Terry Cain
56c65bc67c
Added in publish by phone number 2017-09-26 00:21:07 +01:00
Terry Cain
18cb0bce54
General tidy up 2017-09-21 21:16:00 +01:00
Terry Cain
19074c535c
Added ConfirmSubscription + Tests + checks
For now subscriptions do nothing, but if we go the route of handing out subscribe tokens, I
have layed the groundwork for validating that
2017-09-20 21:47:02 +01:00
Terry Cain
ef8a97f6c3
Implemented Add/RemovePermission + Tests 2017-09-20 21:13:26 +01:00
Terry Cain
f7f80293c7
Implemented OptInPhoneNumber + Tests 2017-09-20 20:56:37 +01:00
Terry Cain
1281ac86d5
Implemented ListPhoneNumbersOptedOut + Tests 2017-09-20 00:03:58 +01:00
Terry Cain
ba8a2ccfc5
Implemented CheckIfPhoneNumberIsOptedOut + Tests + Error code 2017-09-19 23:54:13 +01:00
Terry Cain
57d94d56c3
Implemented SNS.SetSMSAttributes & SNS.GetSMSAttributes + Filtering
TODO:
AddPermission / RemovePermission
CheckIfPhoneNumberIsOptedOut
ConfirmSubscription
ListPhoneNumbersOptedOut
OptInPhoneNumber
2017-09-19 22:48:46 +01:00
Toshiya Kawasaki
0c3708a8e7 Support SNS subscription attributes (#1087)
* remove code for local test

* Add SNS set_subscription_attributes and get_subscription_attributes
2017-09-07 11:19:34 -07:00
Toshiya Kawasaki
ce7eabd44a Envelope sns message when sending to sqs (#1066)
* envelop message when sendig from sns to sqs

* add test for publishing sns message to sqs

* specify separators options to json.dumps to avoid json bug in python2

* remove unused print

* replace time string for testing server mode
2017-08-21 12:29:34 -07:00
Toshiya Kawasaki
f38212a545 sort keys when dumping dict to json 2017-08-18 10:23:11 +09:00
Toshiya Kawasaki
ccf4cf28b1 escape json string when sending message from sns mock to sqs mock 2017-08-18 10:23:11 +09:00
Jack Danger
2b76d07558 Merge pull request #1027 from iCHEF/fix_sns_should_send_json_http_message
Send JSON message to HTTP endpoint of SNS
2017-07-31 12:45:17 -07:00
Peter Us
d76559ee7c SNS delete_topic should also delete subscriptions. 2017-07-31 13:37:29 +02:00
sodastsai
92eedcf291 Send JSON message to HTTP endpoint of SNS
By the documentation from AWS -
http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html ,
SNS would send messages to HTTP/HTTPS endpoint in JSON format. But
current implementation of `moto` sends messages in form-data format.
2017-07-30 20:44:06 +08:00
Steve Pulec
c207963a86 Cleanup SNS exceptions. Closes #751. 2017-03-16 22:28:30 -04:00
Steve Pulec
b2a360aaf7 Remove old boto sns test in favor of boto3 test. 2017-03-11 21:03:03 -05:00
Steve Pulec
1287d53817 Fix tests for py26 and py3. 2017-02-27 20:53:57 -05:00
Steve Pulec
a22caf27ab Cleanup sns default topic. 2017-02-27 10:20:53 -05:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
Steve Pulec
81836b6981 Get standalone server mode working for all tests. 2017-02-23 19:43:48 -05:00
Steve Pulec
cad185c74d Cleanup headers and encoding. 2017-02-16 22:51:04 -05:00
Steve Pulec
fde721bed7 Testing new version of decorator. 2017-02-15 22:35:45 -05:00
Mike Pappas
4942e74ab1 Fix SNS application endpoint to match AWS return format (#763) 2016-11-11 17:01:47 -05:00
Michael van Tellingen
d34dd5b08a
Implement support for sns delete_endpoint() 2016-05-02 14:34:51 +02:00
Pior Bastida
2650eab295 Implement XML responses for SNS (for Boto3) 2015-08-20 14:57:17 -04:00
Steve Pulec
ed38a296db Merge pull request #390 from jotes/iam_sns_server
Added server backends with tests for IAM and SNS services.
2015-08-03 18:58:53 -04:00
Jot
930ac58a4d Added sns backend to servers, added some tests to check backend 2015-08-04 00:20:04 +02:00
Ilya Sukhanov
1819cd7636 Make test_create_and_delete_topic python 2.6 compatible 2015-08-03 10:32:33 -04:00
Ilya Sukhanov
e08796bcf4 Keep current region when creating SNS ARN topic 2015-08-03 10:19:04 -04:00
Steve Pulec
706c60175b Add SNS applications and endpoints. 2015-03-14 09:06:31 -04:00
Jair Henrique
bdb0f1e315 add tests for list_endpoints_by_platform_application 2015-03-06 14:35:17 -03:00