Fix SNS max subject length. Closes #1503.
This commit is contained in:
parent
94ba2e68bd
commit
3373c5bf13
@ -315,7 +315,8 @@ class SNSBackend(BaseBackend):
|
|||||||
return self._get_values_nexttoken(self.subscriptions, next_token)
|
return self._get_values_nexttoken(self.subscriptions, next_token)
|
||||||
|
|
||||||
def publish(self, arn, message, subject=None, message_attributes=None):
|
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')
|
raise ValueError('Subject must be less than 100 characters')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user