mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-19 21:27:55 +00:00
fix tests
This commit is contained in:
parent
3582385eb3
commit
5ec656bd0d
@ -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
|
||||
)
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user