fix tests

This commit is contained in:
xss 2023-10-27 20:47:41 +11:00
parent 3582385eb3
commit 5ec656bd0d
2 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,6 @@ import config_handler
logs = boto3.client('logs')
sequenceToken = None
TOPIC = config_handler.get("SNS","TOPIC")
def set_connection_header(request, operation_name, **kwargs):
request.headers['Connection'] = 'keep-alive'
@ -370,7 +369,7 @@ def post(payload):
f.write(json.dumps(payload).encode('utf-8'))
payload = base64.b64encode(compressed.getvalue()).decode("utf-8")
sns.publish(
TopicArn=TOPIC,
TopicArn=config_handler.get("SNS","TOPIC"),
Message=payload
)

View File

@ -1,6 +1,7 @@
from . import *
import unittest
from unittest.mock import MagicMock
@ -16,6 +17,9 @@ import uuid
import datetime
import copy
config_handler.get = MagicMock(return_value="test")
config_handler.get("SNS","TOPIC")
example_body = [{
"software_name": "SondeHubUploader",
"software_version": "1.0.0",