Fix tests when sqs_extended_client is not installed

The try/except block was triggering when sqs_extended_client isn't installed, which results in boto being overwritten with None
This commit is contained in:
Amit Shah 2024-11-13 11:27:54 +00:00
parent e81d5da536
commit 2d1f6919fc
No known key found for this signature in database
2 changed files with 9 additions and 3 deletions

View File

@ -4,14 +4,12 @@ from __future__ import annotations
try:
import boto3
import sqs_extended_client
from botocore import exceptions
from botocore.awsrequest import AWSRequest
from botocore.httpsession import get_cert_path
from botocore.response import get_response
except ImportError:
boto3 = None
sqs_extended_client = None
class _void:
pass
@ -24,6 +22,11 @@ except ImportError:
get_response = _void()
get_cert_path = _void()
try:
import sqs_extended_client
except ImportError:
sqs_extended_client = None
__all__ = (
'exceptions', 'AWSRequest', 'get_response', 'get_cert_path',

View File

@ -5,7 +5,10 @@ from __future__ import annotations
try:
import boto3
import sqs_extended_client
except ImportError:
boto3 = None
try:
import sqs_extended_client
except ImportError:
sqs_extended_client = None