Use region from ctor to set queue_arn.

Without this, any region passed to boto3.resource is ignored and unit
tests depending on it break.
This commit is contained in:
Raghavendra Prabhu 2016-08-17 22:09:39 +01:00 committed by Raghavendra D Prabhu
commit 34a28b0fd5
2 changed files with 2 additions and 1 deletions

View file

@ -122,7 +122,7 @@ class Queue(object):
self.last_modified_timestamp = now
self.maximum_message_size = 64 << 10
self.message_retention_period = 86400 * 4 # four days
self.queue_arn = 'arn:aws:sqs:us-east-1:123456789012:%s' % self.name
self.queue_arn = 'arn:aws:sqs:{0}:123456789012:{1}'.format(self.region, self.name)
self.receive_message_wait_time_seconds = 0
@classmethod