Skip to content

Commit 223c4c0

Browse files
committed
try to fix default region issue
1 parent 69c1298 commit 223c4c0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
pip install fastjsonschema
1616
- name: 'Run coverage'
1717
run: |
18+
export AWS_DEFAULT_REGION=us-east-1
1819
coverage run --source=src/bulk_importer,src/product_provider,src/provider_espressif,src/provider_infineon,src/provider_microchip -m pytest
1920
coverage report -m
2021
- name: Coverage Badge

test/unit/src/test_bulk_importer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from cryptography.hazmat.backends import default_backend
1313
from cryptography.hazmat.primitives import serialization
1414

15+
1516
from boto3 import resource, client
1617
from src.bulk_importer.testable import LambdaSQSClass
1718
from src.bulk_importer.main import get_certificate_fingerprint, requeue, process_certificate
@@ -20,7 +21,6 @@
2021
# from src.bulk_importer.main import process_policy, process_thing
2122
# from src.bulk_importer.main import process_thing_group, get_name_from_certificate, process_sqs
2223

23-
os.environ['AWS_DEFAULT_REGION'] = "us-east-1"
2424

2525
@mock_aws(config={
2626
"core": {

test/unit/src/test_provider_infineon.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#from aws_lambda_powertools.utilities.validation import validate
1818

1919
#from unittest.mock import MagicMock, patch
20-
sys.path.append('./src/provider_infineon')
21-
os.environ['AWS_DEFAULT_REGION'] = "us-east-1"
20+
2221
from src.provider_infineon.testable import LambdaS3Class, LambdaSQSClass
23-
from src.provider_infineon.main import lambda_handler, s3_object_stream, s3_filebuf_bytes, invoke_export
24-
from src.provider_infineon.schemas import INPUT_SCHEMA
22+
from src.provider_infineon.main import s3_object_stream, s3_filebuf_bytes
23+
#from src.provider_infineon.main import lambda_handler, invoke_export
24+
#from src.provider_infineon.schemas import INPUT_SCHEMA
2525

2626
@mock_aws(config={
2727
"core": {

0 commit comments

Comments
 (0)