Fix SNS max subject length. Closes #1503.

This commit is contained in:
Steve Pulec 2018-04-13 15:17:38 -04:00
parent 94ba2e68bd
commit 3373c5bf13

View File

@ -315,7 +315,8 @@ class SNSBackend(BaseBackend):
return self._get_values_nexttoken(self.subscriptions, next_token)
def publish(self, arn, message, subject=None, message_attributes=None):
if subject is not None and len(subject) >= 100:
if subject is not None and len(subject) > 100:
# Note that the AWS docs around length are wrong: https://github.com/spulec/moto/issues/1503
raise ValueError('Subject must be less than 100 characters')
try: