Commit Graph

33 Commits

Author SHA1 Message Date
Matěj Cepl
77dc60ea97 Port test suite from nose to pytest.
This just eliminates all errors on the tests collection. Elimination of
failures is left to the next commit.
2020-11-10 08:23:44 +01:00
usmangani1
a65c0f004c
Fix:SQS Receive Message (MessageAttributes) in response (#3303)
* Fix:SQS Receive Message (MessageAttributes) in response

* Fixed tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-10-05 10:10:24 +01:00
Karthikeyan Singaravelan
7054143701
Fix deprecation warnings due to invalid escape sequences. (#3273)
* Fix deprecation warnings due to invalid escape sequences.

* Fix linter error.
2020-09-10 09:20:26 +01:00
Kamil Mańkowski
8a551a9754
[SNS] Mock sending directly SMS (#3253)
* [SNS] Mock sending directly SMS

Proper behaviour when publishing to PhoneNumber is sending
message directly to this number, without any topic or
previous confirmation.

https://docs.aws.amazon.com/sns/latest/dg/sns-mobile-phone-number-as-subscriber.html

* Fix arguments order

* Omit checking local backend when tests in server mode
2020-08-25 13:05:49 +01:00
gruebel
23dfecc845 Fix missing MessageAttributes when using RawMessageDelivery 2020-03-21 19:25:25 +01:00
Asher Foa
d9d055c75d Fix more typos. 2020-01-23 10:15:02 -08:00
Fabio Dias
743dd46399 black linting 2019-12-16 21:25:20 -05:00
Fabio Dias
fd9ac4b9a5 ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
Fabio Dias
b83a750630 Added references to moto.iam.models.ACCOUNT_ID instead of hardcoded id 2019-12-16 19:56:11 -05:00
gruebel
3d5d477f7f Fix sns.publish with number type and 0 value 2019-11-16 14:46:05 +01:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
gruebel
d8a922811c Add exact Number, exact String.Array and attribute key matching to SNS subscription filter policy and validate filter policy 2019-08-25 21:08:02 +02: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
Daniel Birnstiel
222cb1535c Add RawMessageDelivery for SNS subscriptions (fixes #1571) 2018-05-30 09:30:18 +02: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
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
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
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
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
Pior Bastida
2650eab295 Implement XML responses for SNS (for Boto3) 2015-08-20 14:57:17 -04:00