def sqs(self): if self._sqs is None: self._sqs = self._aws_connect_to(SQSConnection, regions()) return self._sqs
def test_using_async_connection(self): for region in regions(): self.assertIs(region.connection_cls, AsyncSQSConnection)
def test_when_no_boto_installed(self): with set_module_symbol('kombu.async.aws.sqs', 'boto', None): with self.assertRaises(ImportError): regions()
def test_using_async_connection(self): for region in regions(): assert region.connection_cls is AsyncSQSConnection
def test_when_no_boto_installed(self, patching): patching('kombu.async.aws.sqs.boto', None) with pytest.raises(ImportError): regions()